Merge aosp-toolchain/gcc/gcc-4_9 changes.
[official-gcc.git] / gcc-4_9 / gcc / testsuite / gfortran.dg / inquire_7.f90
blob02e96ab4dcb5215e8909564184b23687457e7446
1 ! { dg-do run }
2 ! pr 19647 / segfault on inquire(..pad=..)
3 ! Thomas.Koenig@online.de
4 ! bdavis9659@comcast.net
5 program main
6 character(len=10) delim
7 ! quote
8 open(10,delim='quote',status='SCRATCH')
9 inquire(10,delim=delim)
10 close(10)
11 if (delim .ne. 'QUOTE') call abort
12 ! apostrophe
13 open(10,delim='apostrophe',status='SCRATCH')
14 inquire(10,delim=delim)
15 close(10)
16 if (delim .ne. 'APOSTROPHE') call abort
17 ! none
18 open(10,status='SCRATCH')
19 inquire(10,delim=delim)
20 close(10)
21 if (delim .ne. 'NONE') call abort
22 ! undefined
23 open(10,form='UNFORMATTED',status='SCRATCH')
24 inquire(10,delim=delim)
25 close(10)
26 if (delim .ne. 'UNDEFINED') call abort
27 end program main