https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111457
Filip Kastl <pheeck at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pheeck at gcc dot gnu.org Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED Keywords|needs-bisection | --- Comment #2 from Filip Kastl <pheeck at gcc dot gnu.org> --- Indeed. Current trunk successfully eliminates the call to foo. gcc testcase.c -S -O2 main: movl $0, a(%rip) xorl %eax, %eax movl $6, b(%rip) movl $0, d(%rip) ret Setting this as fixed.