https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114913
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Jorg Brown from comment #4) > Also odd is that the above code (including a()) works fine on gcc 10.1 > through 13.2. As seen https://godbolt.org/z/z3qnosG37 This is not really odd since it does fail with those compilers with -fchecking (which is the default for the GCC trunk development). It also works with the trunk (in this case) with -fno-checking . Basically GCC has some internal checks to make sure things internally are consistent but they are failing in this case and you can turn them off/on at compile time.