* tree-loop-distribution.c (struct partition): New field recording
[official-gcc.git] / gcc / testsuite / gfortran.dg / read_bang.f90
blob7806ca776ebacf87314e7115bbbaa77158b23eb6
1 ! { dg-do run }
2 ! PR69651 Usage of unitialized pointer io/list_read.c
3 ! Note: The uninitialized pointer was not the cause of the problem
4 ! observed with this test case. The problem was mishandling '!'
5 ! See also test case read_bang4.f90.
6 program test
7 implicit none
8 integer :: i, j, ios
9 real :: r, s
10 complex :: c, d
11 character(20) :: str1, str2
13 i = -5
14 j = -6
15 r = -3.14
16 s = -2.71
17 c = (-1.1,-2.2)
18 d = (-3.3,-4.4)
19 str1 = "candy"
20 str2 = "peppermint"
21 open(15, status='scratch')
22 write(15,*) "10 1!2"
23 write(15,*) " 23.5! 34.5"
24 write(15,*) " (67.50,69.25) (51.25,87.75)!"
25 write(15,*) " 'abcdefgh!' ' !klmnopq!'"
26 rewind(15)
27 read(15,*,iostat=ios) i, j
28 if (ios.ne.5010) call abort
29 read(15,*,iostat=ios) r, s
30 if (ios.ne.5010) call abort
31 read(15,*,iostat=ios) c, d
32 if (ios.ne.5010) call abort
33 read(15,*,iostat=ios) str1, str2
34 if (ios.ne.0) call abort
35 if (str1.ne."abcdefgh!") print *, str1
36 if (str2.ne." !klmnopq!") print *, str2
37 close(15)
38 end program