OSDN Git Service

2010-09-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 14 Sep 2010 04:39:13 +0000 (04:39 +0000)
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 14 Sep 2010 04:39:13 +0000 (04:39 +0000)
PR libfortran/45532
* gfortran.dg/namelist_64.f90: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164267 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/namelist_64.f90 [new file with mode: 0644]

index c663a4b..d22f02c 100644 (file)
@@ -1,3 +1,8 @@
+2010-09-14  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       PR libfortran/45532
+       * gfortran.dg/namelist_64.f90: New test.
+
 2010-09-13  Jakub Jelinek  <jakub@redhat.com>
 
        PR rtl-optimization/45617
diff --git a/gcc/testsuite/gfortran.dg/namelist_64.f90 b/gcc/testsuite/gfortran.dg/namelist_64.f90
new file mode 100644 (file)
index 0000000..b5084e0
--- /dev/null
@@ -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