gcc/testsuite/gfortran.dg/pr18210.f90
raw| 1 | ! { dg-do run } |
| 2 | ! { dg-options "-std=legacy" } |
| 3 | ! |
| 4 | ! Names in upper case and object names starting column 2 |
| 5 | ! Based on example provided by [email protected] |
| 6 | |
| 7 | program pr18210 |
| 8 | |
| 9 | real :: a |
| 10 | character*80 :: buffer |
| 11 | namelist /foo/ a |
| 12 | |
| 13 | a = 1.4 |
| 14 | open (10, status = "scratch") |
| 15 | write (10,foo) |
| 16 | rewind (10) |
| 17 | read (10, '(a)') buffer |
| 18 | if (buffer(2:4) /= "FOO") STOP 1 |
| 19 | read (10, '(a)') buffer |
| 20 | if (buffer(1:2) /= " A") STOP 2 |
| 21 | close (10) |
| 22 | |
| 23 | end program pr18210 |