aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/array_constructor_38.f90
blob: 961e5803206aeb7eac9f5400dca10670206148e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
! { dg-do compile }
! { dg-options "-std=f95" }
!
! PR fortran/44354
! array constructors were giving unexpected results when the ac-implied-do
! variable was used in one of the ac-implied-do bounds.
!
! Original testcase by Vittorio Zecca <zeccav@gmail.com>
!
      I=5
      print *,(/(i,i=I,8)/) ! { dg-error "initial expression references control variable" }
      print *,(/(i,i=1,I)/) ! { dg-error "final expression references control variable" }
      print *,(/(i,i=1,50,I)/) ! { dg-error "step expression references control variable" }
      end