summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/scan_1.f90
blob: ceaa9eb6262994d5d30fa1abf89131cfa7f41ed4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
program b
   integer w
   character(len=2) s, t
   s = 'xi'

   w = scan(s, 'iI')
   if (w /= 2) call abort
   w = scan(s, 'xX', .true.)
   if (w /= 1) call abort
   w = scan(s, 'ab')
   if (w /= 0) call abort
   w = scan(s, 'ab', .true.)
   if (w /= 0) call abort

   s = 'xi'
   t = 'iI'
   w = scan(s, t)
   if (w /= 2) call abort
   t = 'xX'
   w = scan(s, t, .true.)
   if (w /= 1) call abort
   t = 'ab'
   w = scan(s, t)
   if (w /= 0) call abort
   w = scan(s, t, .true.)
   if (w /= 0) call abort

end program b