https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114779

--- Comment #2 from Georg-Johann Lay <gjl at gcc dot gnu.org> ---
Notice that when &SFR is used directly in __builtin_constant_p without an
inline function, then the code works as expected:

int main (void)
{
    if (__builtin_constant_p (& SFR))
        __asm (".warning \"psfr = %0 is constant\"" :: "n" (& SFR));
    return 0;
}

$ gcc bar.c -c -O2
Assembler messages:
Warning: psfr = $256 is constant

Reply via email to