https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26724
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|missed-optimization |documentation
Status|NEW |RESOLVED
Resolution|--- |INVALID
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
From
https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/Other-Builtins.html#index-_005f_005fbuiltin_005fconstant_005fp:
The expression is not evaluated, side-effects are discarded.
So a function call is a side effect and will be thrown away.