summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/initialization_22.f90
blob: f788109e66adb679aa437b6c7e53bd46d460214d (plain)
1
2
3
4
5
6
7
8
9
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