https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126848
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 65353
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=65353&action=edit
gcc17-pr126848-wip.patch
Sadly, C++26 requires us to treat it as VARYING. So, we have the option of
using a different ifn, or special case .DEFERRED_INIT with AUTO_INIT_CXX26 (and
I'm afraid we can't do that just for the AUTO_INIT_CXX26 case but also for
-ftrivial-auto-var-init={zero,pattern} in -std={gnu,c}++{26,29} modes.
This WIP changes AUTO_INIT_CXX26 so that it is a mask and changes for now ccp
to treat .DEFERRED_INIT with that flag as VARYING rather than UNDEFINED.
While this avoids optimizing this away in ccp1 pass, it is optimized later on
during fre1 pass and I don't yet understand why. Seems sccvn treats
.DEFERRED_INIT as VARYING...