aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/scan_1.f90
blob: 1ae2c7d00411ed9f7f929935a9550f6bf514c921 (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) STOP 1
   w = scan(s, 'xX', .true.)
   if (w /= 1) STOP 2
   w = scan(s, 'ab')
   if (w /= 0) STOP 3
   w = scan(s, 'ab', .true.)
   if (w /= 0) STOP 4

   s = 'xi'
   t = 'iI'
   w = scan(s, t)
   if (w /= 2) STOP 5
   t = 'xX'
   w = scan(s, t, .true.)
   if (w /= 1) STOP 6
   t = 'ab'
   w = scan(s, t)
   if (w /= 0) STOP 7
   w = scan(s, t, .true.)
   if (w /= 0) STOP 8

end program b