------- Comment #9 from rguenth at gcc dot gnu dot org 2007-06-20 15:12 ------- Confirmed.
struct barstruct { char const* some_string; }; void changethepointer(struct barstruct**); void baz() { struct barstruct bar1; struct barstruct* barptr = &bar1; changethepointer(&barptr); barptr->some_string = "Everything's OK!"; } We end up with baz () { struct barstruct * barptr; struct barstruct bar1; struct barstruct * barptr.0; <bb 2>: # barptr_2 = V_MUST_DEF <barptr_1>; barptr = &bar1; # barptr_6 = V_MAY_DEF <barptr_2>; # SFT.1_7 = V_MAY_DEF <SFT.1_4>; # NONLOCAL.7_8 = V_MAY_DEF <NONLOCAL.7_5>; changethepointer (&barptr); # VUSE <barptr_6>; barptr.0_3 = barptr; # SFT.1_9 = V_MAY_DEF <SFT.1_7>; barptr.0_3->some_string = &"Everything\'s OK!"[0]; return; } because of a wrong points-to set again: barptr.0_3 = { bar1 } The constraints are Constraints: ANYTHING = &ANYTHING READONLY = &ANYTHING INTEGER = &ANYTHING ESCAPED_VARS = *ESCAPED_VARS NONLOCAL.7 = ESCAPED_VARS ESCAPED_VARS = &NONLOCAL.7 ESCAPED_VARS = &NONLOCAL.7 barptr = &bar1 ESCAPED_VARS = &bar1 ESCAPED_VARS = &barptr barptr.0_3 = barptr where ESCAPED_VARS = &barptr looks wrong? I'd say it needs to be ESCAPED_VARS = barptr instead. Danny? -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dberlin at gcc dot gnu dot | |org Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2007-06-20 15:12:52 date| | Summary|4.2.0: -O2 causes skipped |[4.2 Regression] -fstrict- |code |aliasing causes skipped code http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32328