From: Steven G. Kargl Date: Sat, 1 Nov 2008 17:00:49 +0000 (+0000) Subject: re PR fortran/19925 (Implied do-loop in an initialization expression is broken) X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2a3003441c4663970e8d8c91b462a595f47a82cb;p=platform%2Fupstream%2Fgcc.git re PR fortran/19925 (Implied do-loop in an initialization expression is broken) 2008-11-01 Steven G. Kargl PR fortran/19925 * gfortran.dg/initialization_20.f90: New test. * gfortran.dg/initialization_21.f90: Ditto. From-SVN: r141519 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index bd15093..0328afb 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2008-11-01 Steven G. Kargl + + PR fortran/19925 + * gfortran.dg/initialization_20.f90: New test. + * gfortran.dg/initialization_21.f90: Ditto. + 2008-11-01 Daniel Kraft PR fortran/35681 diff --git a/gcc/testsuite/gfortran.dg/initialization_20.f90 b/gcc/testsuite/gfortran.dg/initialization_20.f90 new file mode 100644 index 0000000..47d5528 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/initialization_20.f90 @@ -0,0 +1,10 @@ +! { dg-do compile } +! Test for PR19925 +! +program pr19925 + implicit none + integer j + integer, parameter :: n = 100000 + integer, parameter :: i(n)=(/(j,j=1,n)/) ! { dg-error "number of elements" } + print *, i(5) +end program pr19925 diff --git a/gcc/testsuite/gfortran.dg/initialization_21.f90 b/gcc/testsuite/gfortran.dg/initialization_21.f90 new file mode 100644 index 0000000..d434476 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/initialization_21.f90 @@ -0,0 +1,11 @@ +! { dg-do compile } +! { dg-options "-fmax-array-constructor=100000" } +! Test for PR19925 +! +program pr19925 + implicit none + integer j + integer, parameter :: n = 100000 + integer, parameter :: i(n) = (/ (j, j=1, n) /) + print *, i(5) +end program pr19925