[Bug target/57018] [4.8/4.9 Regression] Miscompilation of bison 2.7.1 under "-Os -fomit-frame-pointer"

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Apr 22 08:10:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57018

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-04-22 08:10:04 UTC ---
In bar in the more reduced testcase, the second rep_movsi insn uses before
reload argp as the source address of the 16 byte copy.  The argp to stack
pointer elimination offset is 16, 2x saved registers (%esi/%edi), caller's
address and 4 bytes of padding.  But the place where this argp is used is in
between fn argument allocation (sp = sp - 16) and deallocation (sp = sp + 16),
i.e. REG_ARGS_SIZE at that point is 16, thus the code really should have
leal 32(%esp), %esi instead of leal 16(%esp), %esi to point to the argp area.



More information about the Gcc-bugs mailing list