[Bug tree-optimization/71957] [5/6/7 Regression] Invalid code generation with function static objects
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jul 21 12:04:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71957
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hubicka at gcc dot gnu.org
Component|c++ |tree-optimization
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
t.C.086t.ccp2: __builtin_unreachable ();
looks like devirt to me and things go downhill from there. -fno-devirtualize
fixes it for me.
Honza?
_9 = OBJ_TYPE_REF(_3;(struct B)&MEM[(void *)&i]->0) (&MEM[(void *)&i],
k_7(D));
is folded to unreachable () inside D::f.
<bb 3>:
_11 = __cxa_guard_acquire (&_ZGVZ1gvE1i);
if (_11 != 0)
goto <bb 4>;
else
goto <bb 5>;
<bb 4>:
_12 = f ();
C<A>::C (&i, _12);
__cxa_guard_release (&_ZGVZ1gvE1i);
<bb 5>:
_2 = MEM[(struct B *)&i]._vptr.B;
_3 = *_2;
_9 = OBJ_TYPE_REF(_3;(struct B)&MEM[(void *)&i]->0) (&MEM[(void *)&i],
k_7(D));
return _9;
More information about the Gcc-bugs
mailing list