OSDN Git Service

PR fortran/16938
authortobi <tobi@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 27 Sep 2004 16:01:58 +0000 (16:01 +0000)
committertobi <tobi@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 27 Sep 2004 16:01:58 +0000 (16:01 +0000)
* gfortran.dg/pr16938.f90: New test.

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

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

index 36f51a1..092fb98 100644 (file)
@@ -1,3 +1,8 @@
+2004-09-27  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
+
+       PR fortran/16938
+       * gfortran.dg/pr16938.f90: New test.
+
 2004-09-27  Mark Mitchell  <mark@codesourcery.com>
 
        PR c++/17585
diff --git a/gcc/testsuite/gfortran.dg/pr16938.f90 b/gcc/testsuite/gfortran.dg/pr16938.f90
new file mode 100644 (file)
index 0000000..8a9c286
--- /dev/null
@@ -0,0 +1,27 @@
+! { dg-do run }
+! We used to get an internal error in the backend when trying to compile this
+! Added some code which verifies that we're actually doing the right thing.
+  program Array_List 
+    implicit none 
+    type :: Compound 
+      integer                       :: Count 
+      character (len = 4)           :: Name 
+    end type Compound 
+
+    type :: Table 
+      type (Compound)               :: Data (2)  
+      integer :: L_Size  
+    end type Table 
+    type (Table) :: ElementTable
+    ElementTable%Data(1) = Compound(1,"one")
+    ElementTable%Data(2) = Compound(2,"two")
+    ElementTable%L_size  = 2 
+
+    if (elementtable%data(1)%count /= 1) call abort
+    if (elementtable%data(2)%count /= 2) call abort
+    if (elementtable%data(1)%name /= "one ") call abort
+    if (elementtable%data(2)%name /= "two ") call abort
+    if (elementtable%l_size /= 2) call abort
+  end program Array_List