https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124270
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Known to fail| |15.2.0
Summary|Optimizer folds constexpr |[13/14/15 Regression]
|routine into wrong value |constexpr routine into
| |wrong value with -O1 -Wall
Keywords| |wrong-code
Last reconfirmed| |2026-02-26
Target Milestone|--- |13.5
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
Note for the trunk, you need -Wall to invoke the issue.
This has been a bug since at least GCC 7.1.0 even at least on x86_64.
This is a front-end issue.