gcc/testsuite/gfortran.dg/intrinsic_verify_1.f90
raw| 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 |