Debian Codegraph @

gcc/testsuite/gfortran.dg/implied_do_3.f90

raw
1 ! { dg-do compile }
2 !
3 ! Test the fix for PR98458 in which array expressions within the implied-do
4 ! array constructor caused an ICE in trans-array.c(gfc_conv_array_initializer).
5 !
6 ! Contributed by Xiao Liu <[email protected]>
7 !
8 program test
9 implicit none
10 integer :: i
11 integer, parameter :: t(6) = [1,2,3,4,5,6]
12 integer, parameter :: tmp(3,2) = reshape([(t(i:i+1),i=1,3)],[3,2])
13 print *, tmp ! Used to ICE
14 end