re PR fortran/49698 (Unmanageable compiler error)
authorJakub Jelinek <jakub@gcc.gnu.org>
Mon, 11 Jul 2011 16:42:29 +0000 (18:42 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 11 Jul 2011 16:42:29 +0000 (18:42 +0200)
PR fortran/49698
* trans-stmt.c (gfc_trans_pointer_assign_need_temp): Initialize
inner_size to gfc_index_one_node instead of integer_one_node.

* gfortran.dg/pr49698.f90: New test.

From-SVN: r176164

gcc/fortran/ChangeLog
gcc/fortran/trans-stmt.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/pr49698.f90 [new file with mode: 0644]

index 2f0b50889f4f91804a3420ab75919f4302cd660a..9484523370c3aebf2ab56a923c93048ac562f1a8 100644 (file)
@@ -1,3 +1,9 @@
+2011-07-11  Jakub Jelinek  <jakub@redhat.com>
+
+       PR fortran/49698
+       * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Initialize
+       inner_size to gfc_index_one_node instead of integer_one_node.
+
 2011-07-10  Tobias Burnus  <burnus@net-b.de>
 
        PR fortran/49690
index 88fdcd182d0add26e469ae071fd3e1456d6edb92..7117219851f96e2b299f18461dd27ee35e2af5ec 100644 (file)
@@ -3323,7 +3323,7 @@ gfc_trans_pointer_assign_need_temp (gfc_expr * expr1, gfc_expr * expr2,
   count = gfc_create_var (gfc_array_index_type, "count");
   gfc_add_modify (block, count, gfc_index_zero_node);
 
-  inner_size = integer_one_node;
+  inner_size = gfc_index_one_node;
   lss = gfc_walk_expr (expr1);
   rss = gfc_walk_expr (expr2);
   if (lss == gfc_ss_terminator)
index efb3482b5732f0188218749d3c0f559ad5575aa7..36c375d7f202ca5fa20d7d920ec53a66afcb5e0b 100644 (file)
@@ -1,4 +1,9 @@
-2011-07-11  Jeff Law <law@redhat.com>
+2011-07-11  Jakub Jelinek  <jakub@redhat.com>
+
+       PR fortran/49698
+       * gfortran.dg/pr49698.f90: New test.
+
+2011-07-11  Jeff Law  <law@redhat.com>
 
        * gcc.dg/uninit-pred-8_b.c: Disable dominator optimizations.
 
diff --git a/gcc/testsuite/gfortran.dg/pr49698.f90 b/gcc/testsuite/gfortran.dg/pr49698.f90
new file mode 100644 (file)
index 0000000..638cbb0
--- /dev/null
@@ -0,0 +1,15 @@
+! PR fortran/49698
+! { dg-do compile }
+subroutine foo (x, y, z)
+  type S
+    integer, pointer :: e => null()
+  end type S
+  type T
+    type(S), dimension(:), allocatable :: a
+  end type T
+  type(T) :: x, y
+  integer :: z, i
+  forall (i = 1 : z)
+    y%a(i)%e => x%a(i)%e
+  end forall
+end subroutine foo