[Bug tree-optimization/30567] [4.2 Regression] -O3 optimizer bug
dberlin at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Apr 25 18:45:00 GMT 2007
------- Comment #33 from dberlin at gcc dot gnu dot org 2007-04-25 19:45 -------
I think richi said on IRC that the following backport from 4.3 will fix it (if
so, it's the correct fix here)
Index: tree-ssa-structalias.c
===================================================================
--- tree-ssa-structalias.c (revision 122853)
+++ tree-ssa-structalias.c (working copy)
@@ -3228,7 +3228,8 @@ update_alias_info (tree stmt, struct ali
/* If the statement makes a function call, assume
that pointer OP will be dereferenced in a store
operation inside the called function. */
- if (get_call_expr_in (stmt))
+ if (get_call_expr_in (stmt)
+ || stmt_escape_type == ESCAPE_STORED_IN_GLOBAL)
{
bitmap_set_bit (ai->dereferenced_ptrs_store, DECL_UID (var));
pi->is_dereferenced = 1;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30567
More information about the Gcc-bugs
mailing list