------- Comment #7 from rguenth at gcc dot gnu dot org 2009-03-20 10:31 ------- Hm? In the testcase the argument points to NULL. I do not see that
1) assigning sth else to the parameter is forbidden by the optimization switch 2) we prevent the compiler from coalescing an unrelated SSA_NAME to that same base variable decl of the param. The problem is that may_alias_p get's a pointer DECL, not an SSA_NAME and checks /* If -fargument-noalias-global is > 2, pointer arguments may not point to anything else. */ if (flag_argument_noalias > 2 && TREE_CODE (ptr) == PARM_DECL) { alias_stats.alias_noalias++; alias_stats.simple_resolved++; return false; } which is very fragile. We can just delete that check entirely and rely on PTA properly tracking if a pointer still (only) points to the PARM_NOALIAS variable we created for the points-to set of the incoming pointer SSA_NAME. Anyway, I won't force a fix down your throat for 4.4 but will just remove the above code pieces on a-i branch. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39506