This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/47455] [4.6 Regression][OOP] internal compiler error: in fold_convert_loc, at fold-const.c:2028


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,


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]