------- Comment #17 from rguenth at gcc dot gnu dot org 2007-05-01 14:00 ------- Without -fstrict-aliasing we mark this_20->functor_ = D.2946; obviously necessary because it is is_hidden_global_store ():
;; Function sigc::slot0 A::bar() (_ZN1A3barEv) -Marking useful stmt: this_20->functor_ = D.2946; - -Marking useful stmt: D.3047_33 = operator new (20); +Marking useful stmt: D.3054_33 = operator new (20); Marking useful stmt: this_35->functor_ = D.2514; -Marking useful stmt: D.3053_46->call_ = call_it; +Marking useful stmt: D.3060_46->call_ = call_it; Marking useful stmt: return <retval>; without that we DCE too much as # SFT.80_6 = V_MUST_DEF <SFT.80_5>; D.2378.func_ptr_ = foo; ... # D.2951_27 = V_MUST_DEF <D.2951_26>; # VUSE <SFT.80_6>; D.2951 = D.2378; # SFT.77_50 = V_MAY_DEF <SFT.77_49>; # VUSE <D.2951_27>; this_20->functor_ = D.2951; # SFT.77_63 = V_MUST_DEF <SFT.77_50>; D.2514.bound1_.visited_ = D.2953_31; the last store kills the assignment to this_20->functor_. Note that while we have uses for D.2951_27 and SFT.80_6 the structure assignment to this_20->functor_ for some reason shares the SFT with the assignment to D.2514.bound1_.visited_. So this may be as well a frontend bug. -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|WAITING |NEW Ever Confirmed|0 |1 Keywords| |alias Last reconfirmed|0000-00-00 00:00:00 |2007-05-01 14:00:47 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30252