[Bug ipa/111036] [13 Regression] Code generation error in handling __builtin_constant_p
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Mar 20 09:59:18 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111036
--- Comment #12 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Richard Biener
<rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:453b952a787d28e9a3081f0b0786cd3ed7ffa7b9
commit r13-10145-g453b952a787d28e9a3081f0b0786cd3ed7ffa7b9
Author: Richard Biener <rguenther@suse.de>
Date: Wed Jan 28 10:55:56 2026 +0100
ipa/111036 - strip nop conversions around __builtin_constant_p arguments
The PR is about inconsistent behavior wrt inline predicate analysis
and later folding of __builtin_constant_p which ultimatively results
from fold_builtin_constant_p stripping nops off its argument but
this not being done on GIMPLE. The following adds a match.pd pattern
for this.
PR ipa/111036
* match.pd (__builtin_constant_p ((T)x)): Strip nop-conversions
from __builtin_constant_p arguments.
* gcc.dg/torture/pr111036.c: New testcase.
(cherry picked from commit 8c0458505a9b1b276fbad81d20849b88eda12d24)
More information about the Gcc-bugs
mailing list