summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/scan_1.f90
blob: 5ae64912e2e2c3c574c35ddffb1ea35d5fb37377 (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
32
! { dg-do run }
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