| 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 <[email protected]> |
| 4 |
|
| 5 |
! Long names used to test line_buffer feature is working. |
| 6 |
|
| 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) |
| 21 |
|
| 22 |
if (b01234567890123456789012345678901234567890123456789012345678901(1).ne.& |
| 23 |
" AAP NOOT MIES WIM ZUS JET ") STOP 1 |
| 24 |
if (b01234567890123456789012345678901234567890123456789012345678901(2).ne.& |
| 25 |
"SURF.PRESSURE ") STOP 2 |
| 26 |
if (b01234567890123456789012345678901234567890123456789012345678901(3).ne.& |
| 27 |
"APEKOOL ") STOP 3 |
| 28 |
end program test |
| 29 |
|