https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81820
--- Comment #1 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> --- Author: hjl Date: Sun Aug 13 18:31:39 2017 New Revision: 251076 URL: https://gcc.gnu.org/viewcvs?rev=251076&root=gcc&view=rev Log: i386: Replace frame pointer with stack pointer in debug insns When we eliminate frame pointer, we should also replace frame pointer with stack pointer - UNITS_PER_WORD in debug insns. This patch fixed: FAIL: gcc.dg/guality/pr58791-5.c -Os line pr58791-5.c:20 b1 == 9 FAIL: gcc.dg/guality/pr58791-5.c -Os line pr58791-5.c:20 b2 == 73 FAIL: gcc.dg/guality/pr58791-5.c -Os line pr58791-5.c:20 b3 == 585 FAIL: gcc.dg/guality/pr58791-5.c -Os line pr58791-5.c:20 b4 == 4681 FAIL: gcc.dg/guality/pr59776.c -Os line pr59776.c:17 s1.f == 5.0 FAIL: gcc.dg/guality/pr59776.c -Os line pr59776.c:17 s1.g == 6.0 FAIL: gcc.dg/guality/pr59776.c -Os line pr59776.c:17 s2.g == 6.0 FAIL: gcc.dg/guality/pr59776.c -Os line pr59776.c:20 s1.f == 5.0 FAIL: gcc.dg/guality/pr59776.c -Os line pr59776.c:20 s1.g == 6.0 FAIL: gcc.dg/guality/pr59776.c -Os line pr59776.c:20 s2.f == 5.0 FAIL: gcc.dg/guality/pr59776.c -Os line pr59776.c:20 s2.g == 6.0 on Linux/i386. PR target/81820 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Replace frame pointer with stack pointer - UNITS_PER_WORD in debug insns. Modified: trunk/gcc/config/i386/i386.c