| 1 |
! { dg-do run } |
| 2 |
! PR45532 gfortran namelist read error. |
| 3 |
! Derived from the original test case by David Sagan. |
| 4 |
program test |
| 5 |
implicit none |
| 6 |
type line_struct |
| 7 |
integer :: width = 10 |
| 8 |
end type |
| 9 |
type symbol_struct |
| 10 |
integer :: typee = 313233 |
| 11 |
end type |
| 12 |
type curve_struct |
| 13 |
type (line_struct) line |
| 14 |
type (symbol_struct) symbol |
| 15 |
end type |
| 16 |
type (curve_struct) curve(10) |
| 17 |
namelist / params / curve |
| 18 |
! |
| 19 |
open (10, status="scratch") |
| 20 |
write(10,*) "¶ms" |
| 21 |
write(10,*) " curve(1)%symbol%typee = 1234" |
| 22 |
write(10,*) "/" |
| 23 |
rewind(10) |
| 24 |
read (10, nml = params) |
| 25 |
if (curve(1)%symbol%typee /= 1234) STOP 1 |
| 26 |
close(10) |
| 27 |
end program |