PR tree-optimization/86415 - strlen() not folded for substrings within constant arrays
[official-gcc.git] / gcc / testsuite / gfortran.dg / intrinsic_verify_1.f90
blob69ead3168b900326c6ea5b188835381bf85062aa
1 ! { dg-do run }
2 ! Test the verify intrinsic. We were ignoring the last character.
3 program prog
4 character(len=1) :: c1
5 character(len=4) :: c4
6 c1 = "E"
7 if (verify(c1, "1") .ne. 1) STOP 1
8 c4 = "ABBA"
9 if (verify(c4, "A") .ne. 2) STOP 2
10 if (verify(c4, "A", back = .true.) .ne. 3) STOP 3
11 if (verify(c4, "AB") .ne. 0) STOP 4
12 end program