2 ! { dg-options "-fdump-tree-original" }
6 ! Contributed by James Van Buskirk
13 integer iscan
, iverify
14 character(7), parameter :: tf(2) = ['.FALSE.','.TRUE. ']
16 iscan
= scan('AA','A',back
=A
)
17 iverify
= verify('xx','A',back
=A
)
18 if (iscan
/= 2 .or
. iverify
/= 2) call abort ()
19 print *, iverify
, iscan
20 ! write(*,'(a)') 'SCAN test: A = '//trim(tf(iscan)) ! should print true
21 ! write(*,'(a)') 'VERIFY test: A = '//trim(tf(iverify)) ! should print true
33 ! { dg-final { scan-tree-dump-times "iscan = _gfortran_string_scan \\(2," 1 "original" } }
34 ! { dg-final { scan-tree-dump-times "iverify = _gfortran_string_verify \\(2," 1 "original" } }
35 ! { dg-final { cleanup-tree-dump "original" } }