This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/81820] -Os may remove debug info
- From: "aldyh at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 13 Sep 2017 16:56:43 +0000
- Subject: [Bug target/81820] -Os may remove debug info
- Auto-submitted: auto-generated
- References: <bug-81820-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81820
--- Comment #2 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
Author: aldyh
Date: Wed Sep 13 16:56:11 2017
New Revision: 252419
URL: https://gcc.gnu.org/viewcvs?rev=252419&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:
branches/range-gen2/gcc/config/i386/i386.c