[Bug fortran/55935] [OOP] Fortran fronted has ADDR_EXPRs of FUNCTION_DECLs with bogus BLOCK

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jan 11 14:56:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55935

--- Comment #15 from Richard Biener <rguenth at gcc dot gnu.org> 2013-01-11 14:55:55 UTC ---
Index: tree-ssa-pre.c
===================================================================
--- tree-ssa-pre.c      (revision 195103)
+++ tree-ssa-pre.c      (working copy)
@@ -3246,7 +3246,8 @@ insert_into_preds_of_block (basic_block
       gcc_assert (get_expr_type (ae) == type
                  || useless_type_conversion_p (type, get_expr_type (ae)));
       if (ae->kind == CONSTANT)
-       add_phi_arg (phi, PRE_EXPR_CONSTANT (ae), pred, UNKNOWN_LOCATION);
+       add_phi_arg (phi, unshare_expr (PRE_EXPR_CONSTANT (ae)),
+                    pred, UNKNOWN_LOCATION);
       else
        add_phi_arg (phi, PRE_EXPR_NAME (ae), pred, UNKNOWN_LOCATION);
     }



More information about the Gcc-bugs mailing list