This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/29565] [4.1/4.2/4.3 Regression] ICE in gimplify_var_or_parm_decl, at gimplify.c
- From: "pault at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Oct 2006 07:18:34 -0000
- Subject: [Bug fortran/29565] [4.1/4.2/4.3 Regression] ICE in gimplify_var_or_parm_decl, at gimplify.c
- References: <bug-29565-11265@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from pault at gcc dot gnu dot org 2006-10-25 07:18 -------
This fixes it but has not been regtested. I was hoping to have found a
slightly cleaner way to fix this but did not alight on anything that would not
be a big performance. It's OK for rank 1 arrays but for rank 2 or higher,
carries baggage in the form of various other declarations from the loopinfo
that was never used.
Index: gcc/fortran/trans-expr.c
===================================================================
*** gcc/fortran/trans-expr.c (revision 117860)
--- gcc/fortran/trans-expr.c (working copy)
*************** gfc_conv_aliased_arg (gfc_se * parmse, g
*** 1708,1716 ****
}
else
{
! /* Make sure that the temporary declaration survives. */
! tmp = gfc_finish_block (&body);
! gfc_add_expr_to_block (&loop.pre, tmp);
}
/* Add the post block after the second loop, so that any
--- 1708,1721 ----
}
else
{
! /* Make sure that the temporary declaration survives by merging
! all the loop declarations into the current context. */
! for (n = 0; n < loop.dimen; n++)
! {
! gfc_merge_block_scope (&body);
! body = loop.code[loop.order[n]];
! }
! gfc_merge_block_scope (&body);
}
/* Add the post block after the second loop, so that any
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29565