diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/initialization_22.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/initialization_22.f90 | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/initialization_22.f90 b/gcc/testsuite/gfortran.dg/initialization_22.f90 new file mode 100644 index 000000000..f788109e6 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/initialization_22.f90 @@ -0,0 +1,10 @@ +! { dg-do run } +! tests the fix for PR39292, where the intitialization expression +! did not simplify and caused an ICE in gfc_conv_array_initializer. +! +! Contributed by Richard Guenther <rguenth@gcc.gnu.org> +! + integer :: n + real, dimension(2) :: a = (/ ( (float(n))**(1.0), n=1,2) /) + if (any (a .ne. (/ ( (float(n))**(1.0), n=1,2) /))) call abort +end |