Message ID | 20110711162413.GI2687@tyan-ft48-01.lab.bos.redhat.com |
---|---|
State | New |
Headers | show |
On 07/11/2011 06:24 PM, Jakub Jelinek wrote: > As the attached testcase (on x86-64) shows, inner_size is initialized to > 1 of a wrong type, which results in verify_stmt ICEs because a PLUS has > one 64-bit and one 32-bit operand. > > Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux. > Ok for trunk/4.6? OK. I would even claim the patch is obvious. Thanks for taking care of this PR. Tobias
--- gcc/fortran/trans-stmt.c.jj 2011-07-07 13:23:57.000000000 +0200 +++ gcc/fortran/trans-stmt.c 2011-07-11 10:53:34.000000000 +0200 @@ -3323,7 +3323,7 @@ gfc_trans_pointer_assign_need_temp (gfc_ 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) --- gcc/testsuite/gfortran.dg/pr49698.f90.jj 2011-07-11 11:32:01.000000000 +0200 +++ gcc/testsuite/gfortran.dg/pr49698.f90 2011-07-11 11:21:53.000000000 +0200 @@ -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