This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/47455] [4.6 Regression][OOP] internal compiler error: in fold_convert_loc, at fold-const.c:2028
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 25 Jan 2011 20:33:06 +0000
- Subject: [Bug fortran/47455] [4.6 Regression][OOP] internal compiler error: in fold_convert_loc, at fold-const.c:2028
- Auto-submitted: auto-generated
- References: <bug-47455-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47455
--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-01-25 20:32:53 UTC ---
RFC patch. Janus, what do you think?
(Compiles and works for the example; no further tests.)
--- a/gcc/fortran/trans-expr.c
+++ b/gcc/fortran/trans-expr.c
@@ -5929,6 +5929,9 @@ gfc_trans_assignment_1 (gfc_expr * expr1, gfc_expr *
expr2, bool init_flag,
gfc_add_expr_to_block (&loop.post, tmp);
}
+ if (expr2->expr_type == EXPR_FUNCTION && gfc_expr_attr (expr2).proc_pointer)
+ rse.expr = build_fold_indirect_ref_loc (input_location, rse.expr);
+
tmp = gfc_trans_scalar_assign (&lse, &rse, expr1->ts,
l_is_temp || init_flag,
expr_is_variable (expr2) || scalar_to_array,