[Bug c/108968] fanalyzer false positive with the uninitalised-ness of the stack pointer
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108968 Andrew Cooper changed: What|Removed |Added Component|analyzer|c --- Comment #4 from Andrew Cooper --- (In reply to Andreas Schwab from comment #3) > Perhaps it works if you declare the register variable in file scope. Huh. I honestly expected that not to compile, but it appears to, and it appears to work. There is minor perturbation in the build, but as far as I can see, it's just slightly different register/instruction scheduling. Why does being at global scope change the diagnostic?
[Bug c/108968] fanalyzer false positive with the uninitalised-ness of the stack pointer
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108968 --- Comment #3 from Andreas Schwab --- Perhaps it works if you declare the register variable in file scope.
[Bug c/108968] fanalyzer false positive with the uninitalised-ness of the stack pointer
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108968 --- Comment #2 from Andrew Cooper --- __builtin_frame_address() does appear to resolve the warning, but the knock-on effect for code generation is even worse than the asm() block. It forces a frame-pointer setup in all functions that use it (which is most functions in Xen), even leaf functions, and despite -fomit-frame-pointer, which in turn causes spilling of other registers now that %rbp isn't usable.
[Bug c/108968] fanalyzer false positive with the uninitalised-ness of the stack pointer
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108968 --- Comment #1 from Andreas Schwab --- Can you use __builtin_frame_address instead?