https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106064
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #3) > (In reply to Mikael Pettersson from comment #2) > > Seems target-dependent. I can't reproduce on x86_64-linux-gnu or > > sparc64-linux-gnu: both compile f() to return 1 and g() to perform a runtime > > computation. But ppc64-linux-gnu and armv7l-linux-gnueabi behave as your > > aarch64 example: f() returns 1 and g() returns 0 (unconditionally, no > > runtime computations). > > Most likely section anchors is the cause of the difference between the > targets. > The ones which implement section anchors return different values between the > functions. Is suspect MIPS has similar behavior too. It is also most likely why aarch64 changed between 8 and 9 too.