2014-04-15 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gfortran.dg / namelist_39.f90
blob427ba6dc2bf5ae61ae3661fe02a4038d687bdfe7
1 ! { dg-do run }
2 ! PR33421 and PR33253 Weird quotation of namelist output of character arrays
3 ! Test case from Toon Moone, adapted by Jerry DeLisle <jvdelisle@gcc.gnu.org>
5 ! Long names used to test line_buffer feature is working.
7 program test
8 implicit none
9 character(len=45) :: b01234567890123456789012345678901234567890123456789012345678901(3)
10 namelist /nam/ b01234567890123456789012345678901234567890123456789012345678901
11 b01234567890123456789012345678901234567890123456789012345678901 = 'x'
12 open(99, status="scratch")
13 write(99,'(4(a,/),a)') "&NAM", &
14 " b01234567890123456789012345678901234567890123456789012345678901(1)=' AAP NOOT MIES WIM ZUS JET',", &
15 " b01234567890123456789012345678901234567890123456789012345678901(2)='SURF.PRESSURE',", &
16 " b01234567890123456789012345678901234567890123456789012345678901(3)='APEKOOL',", &
17 " /"
18 rewind(99)
19 read(99,nml=nam)
20 close(99)
22 if (b01234567890123456789012345678901234567890123456789012345678901(1).ne.&
23 " AAP NOOT MIES WIM ZUS JET ") call abort
24 if (b01234567890123456789012345678901234567890123456789012345678901(2).ne.&
25 "SURF.PRESSURE ") call abort
26 if (b01234567890123456789012345678901234567890123456789012345678901(3).ne.&
27 "APEKOOL ") call abort
28 end program test