2015-07-03 Christophe Lyon <christophe.lyon@linaro.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / array_constructor_38.f90
blob961e5803206aeb7eac9f5400dca10670206148e4
1 ! { dg-do compile }
2 ! { dg-options "-std=f95" }
4 ! PR fortran/44354
5 ! array constructors were giving unexpected results when the ac-implied-do
6 ! variable was used in one of the ac-implied-do bounds.
8 ! Original testcase by Vittorio Zecca <zeccav@gmail.com>
10 I=5
11 print *,(/(i,i=I,8)/) ! { dg-error "initial expression references control variable" }
12 print *,(/(i,i=1,I)/) ! { dg-error "final expression references control variable" }
13 print *,(/(i,i=1,50,I)/) ! { dg-error "step expression references control variable" }
14 end