------- 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