https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127693
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
CC| |hubicka at gcc dot gnu.org,
| |jamborm at gcc dot gnu.org,
| |rguenth at gcc dot gnu.org
Priority|P3 |P2
Last reconfirmed| |2026-10-02
--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Drea Pinski from comment #3)
> I think what gcc is doing for __builtin_constant_p is correct and exactly as
> documented too. That is it is invalid expection from the qt libraries of
> __builtin_constant_p to act differently
That GCC evaluates __builtin_constant_p to both true (via IPA predicate) and
false (via later optimization) is a bug - one that has hit us before, and I
thought inlining forces the predicates into the IL, but appearantly it still
does not ...
I suppose the conservative way is to never IPA evaluate __builtin_constant_p as
it is clear we cannot do so reliably.