https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85746
--- Comment #5 from Marc Glisse <glisse at gcc dot gnu.org> --- The patch breaks 3 tests on a bootstrapped compiler: c-c++-common/Warray-bounds-2.c c-c++-common/ubsan/ptr-overflow-sanitization-1.c gcc.dg/Warray-bounds-30.c The last one in particular shows that the compiler is miscompiled (it works with the stage 1 compiler but breaks with stage 2 or 3). From the dumps, the compilation seems to diverge in FRE1, so the miscompiled function might be in a function called from FRE. I find it suspicious that just refusing to fold __builtin_constant_p can cause this. The 2 explanations I can think of are: - latent bug uncovered by the change - a variable that needs to be statically initialized (order of initialization?) and ends up dynamically initialized because of the change