OSDN Git Service

2008-03-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 15 Mar 2008 16:53:05 +0000 (16:53 +0000)
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 15 Mar 2008 16:53:05 +0000 (16:53 +0000)
PR testsuite/35184
gfortran.dg/elemental_subroutine_6.f90: New test.

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

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

index 48445d9..ec3196b 100644 (file)
@@ -1,3 +1,8 @@
+2008-03-15  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       PR testsuite/35184
+       gfortran.dg/elemental_subroutine_6.f90: New test.
+
 2008-03-15  Richard Guenther  <rguenther@suse.de>
 
        * gcc.dg/pr23911.c: Adjust testcase.
diff --git a/gcc/testsuite/gfortran.dg/elemental_subroutine_6.f90 b/gcc/testsuite/gfortran.dg/elemental_subroutine_6.f90
new file mode 100644 (file)
index 0000000..aab33f3
--- /dev/null
@@ -0,0 +1,24 @@
+! { dg-do compile }
+! PR35184 ICE in gfc_conv_array_index_offset
+MODULE foo
+  TYPE, PUBLIC :: bar
+    PRIVATE
+      REAL :: value
+  END TYPE bar
+  INTERFACE ASSIGNMENT (=)
+    MODULE PROCEDURE assign_bar
+  END INTERFACE ASSIGNMENT (=)
+CONTAINS
+  ELEMENTAL SUBROUTINE assign_bar (to, from)
+    TYPE(bar), INTENT(OUT) :: to
+    TYPE(bar), INTENT(IN) :: from
+    to%value= from%value
+  END SUBROUTINE
+  SUBROUTINE my_sub (in, out)
+    IMPLICIT NONE
+    TYPE(bar), DIMENSION(:,:), POINTER :: in
+    TYPE(bar), DIMENSION(:,:), POINTER :: out
+    ALLOCATE( out(1:42, 1:42) )
+    out(1, 1:42) = in(1, 1:42)
+  END SUBROUTINE
+END MODULE foo
\ No newline at end of file