https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127693
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I think one side of this problem is the lack of remapping __builtin_constant_p
directly to false or true when the inliner assumes so, but also when it assumes
true whether we actually optimize it. Because folding it to true in the
inliner when it uses a structure member known to be constant and then no SRA
actually optimizing in code guarded with __builtin_constant_p could misbehave
as well, e.g. code doing if (__builtin_constant_p (m.size)) asm ("" : : "i"
(m.size)); and then if SRA doesn't optimize it, we get an error.