Update concepts branch to revision 131834
[official-gcc.git] / gcc / testsuite / gfortran.fortran-torture / execute / intrinsic_index.f90
blob9b181775f9c4bbb24ec0e3b34470a69f9a7dcdc3
1 ! Program to test the INDEX intrinsic
2 program test
3 character(len=10) a
4 integer w
5 if (index("FORTRAN", "R") .ne. 3) call abort
6 if (index("FORTRAN", "R", .TRUE.) .ne. 5) call abort
7 if (w ("FORTRAN") .ne. 3) call abort
8 end
10 function w(str)
11 character(len=8) str
12 integer w
13 w = index(str, "R")
14 end