This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/48331] [4.7 Regression] gcc.c-torture/execute/built-in-setjmp.c FAILs with -O -fira-algorithm=priority -fPIC
- From: "zsojka at seznam dot cz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 29 Mar 2011 12:10:42 +0000
- Subject: [Bug rtl-optimization/48331] [4.7 Regression] gcc.c-torture/execute/built-in-setjmp.c FAILs with -O -fira-algorithm=priority -fPIC
- Auto-submitted: auto-generated
- References: <bug-48331-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48331
--- Comment #1 from Zdenek Sojka <zsojka at seznam dot cz> 2011-03-29 12:10:38 UTC ---
The "while (1)" part of the testcase is not actually needed.
The problem seems to be there (at the assembly level):
...
mov rax, QWORD PTR buf@GOTPCREL[rip] #,
mov rax, QWORD PTR 8[rax] #,
mov QWORD PTR -8[rbp], rax # %sfp, # stores value
mov rax, QWORD PTR buf@GOTPCREL[rip] #,
mov rbp, QWORD PTR [rax] #, # rbp changes
mov rsp, QWORD PTR 16[rax] #,
jmp [QWORD PTR -8[rbp]] # %sfp # uses new value or rbp
...
Maybe this was just uncovered by recent changes - comparing asm output from
r171626 and r171653 shows the priority allocator now gives much worse results.
In r171626, the generated code is the same as with CB's allocator, but in
r171653 there is much higher stack usage, causing this problem to show up.