summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/namelist_64.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/namelist_64.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/namelist_64.f9027
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/namelist_64.f90 b/gcc/testsuite/gfortran.dg/namelist_64.f90
new file mode 100644
index 000000000..b5084e0f6
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/namelist_64.f90
@@ -0,0 +1,27 @@
+! { dg-do run }
+! PR45532 gfortran namelist read error.
+! Derived from the original test case by David Sagan.
+program test
+implicit none
+type line_struct
+ integer :: width = 10
+end type
+type symbol_struct
+ integer :: typee = 313233
+end type
+type curve_struct
+ type (line_struct) line
+ type (symbol_struct) symbol
+end type
+type (curve_struct) curve(10)
+namelist / params / curve
+!
+open (10, status="scratch")
+write(10,*) "&params"
+write(10,*) " curve(1)%symbol%typee = 1234"
+write(10,*) "/"
+rewind(10)
+read (10, nml = params)
+if (curve(1)%symbol%typee /= 1234) call abort
+close(10)
+end program