This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/42888] [4.5 Regression] ICE in fold_convert_loc, at fold-const.c:2670
- From: "janus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Jan 2010 14:51:47 -0000
- Subject: [Bug fortran/42888] [4.5 Regression] ICE in fold_convert_loc, at fold-const.c:2670
- References: <bug-42888-6318@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #10 from janus at gcc dot gnu dot org 2010-01-28 14:51 -------
(In reply to comment #9)
> Index: gcc/fortran/trans-stmt.c
> ===================================================================
> --- gcc/fortran/trans-stmt.c (revision 156258)
> +++ gcc/fortran/trans-stmt.c (working copy)
> @@ -4180,6 +4180,7 @@ gfc_trans_allocate (gfc_code * code)
> else if (expr->ts.type == BT_DERIVED
> && (init_e = gfc_default_initializer (&expr->ts)))
> {
> + gfc_resolve_expr (init_e);
> tmp = gfc_trans_assignment (gfc_expr_to_initialize (expr),
> init_e, true);
> gfc_add_expr_to_block (&block, tmp);
This patch does not induce any regressions in the testsuite. However, the
question is if there are other problems, e.g. when resolve_structure_cons would
throw an error message.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42888