[Bug tree-optimization/102586] [12 Regression] ICE in clear_padding_type, at gimple-fold.c:4798 since r12-3433-ga25e0b5e6ac8a77a

jason at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Mar 12 04:40:38 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102586

--- Comment #28 from Jason Merrill <jason at gcc dot gnu.org> ---
(In reply to Qing Zhao from comment #27)
> Does this issue only exist with -flifetime-dse=2?
> When -flifetime-dse=2, the call to __builtin_clear_padding should be
> inserted AFTER the start point of the constructor of the object, otherwise
> it’s dead and will be eliminated by DSE. 
> And with -flifetime-dse=2, the padding initialization should be done by C++
> FE instead of middle end.
> Is this understanding correct?

Yes, -flifetime-dse=2 conflicts with -ftrivial-auto-var-init in that both are
trying to define the initial state of the variable.

Perhaps -ftrivial-auto-var-init should lower to -flifetime-dse=1.

Or change build_clobber_this to do the specified initialization instead of a
clobber, though that would mean doing the initialization for any object of that
type, not just automatics.


More information about the Gcc-bugs mailing list