[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / gfortran.dg / index.f90
blob58cd25c701ee56c732be24589b6c0495456352c6
1 ! { dg-do run }
2 ! pr35940
3 program FA1031
4 implicit none
5 integer I
6 INTEGER IDA1(10)
7 LOGICAL GDA1(10)
8 INTEGER RSLT(10)
9 DATA RSLT /4,1,4,1,4,1,4,1,4,1/
10 IDA1 = 0
11 gda1 = (/ (i/2*2 .ne. I, i=1,10) /)
13 IDA1 = INDEX ( 'DEFDEF' , 'DEF', GDA1 ) !fails
14 do I = 1, 10
15 if (IDA1(i).NE.RSLT(i)) call abort
16 end do
17 IDA1 = INDEX ( (/ ('DEFDEF',i=1,10) /) , 'DEF', GDA1 ) !works
18 do I = 1, 10
19 if (IDA1(i).NE.RSLT(i)) call abort
20 end do
22 END