From: Jakub Jelinek Date: Mon, 11 Jul 2011 16:42:29 +0000 (+0200) Subject: re PR fortran/49698 (Unmanageable compiler error) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=932ebb945fca9b847e2a8db42eb868191a1a56a9;p=gcc.git re PR fortran/49698 (Unmanageable compiler error) 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 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 2f0b50889f4..9484523370c 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2011-07-11 Jakub Jelinek + + 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 PR fortran/49690 diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c index 88fdcd182d0..7117219851f 100644 --- a/gcc/fortran/trans-stmt.c +++ b/gcc/fortran/trans-stmt.c @@ -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) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index efb3482b573..36c375d7f20 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,4 +1,9 @@ -2011-07-11 Jeff Law +2011-07-11 Jakub Jelinek + + PR fortran/49698 + * gfortran.dg/pr49698.f90: New test. + +2011-07-11 Jeff Law * 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 index 00000000000..638cbb0b785 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr49698.f90 @@ -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