[RFC PATCH] Fix middle-end/6963
David Edelsohn
dje@watson.ibm.com
Thu Jun 27 15:30:00 GMT 2002
It turns out that this patch introduces new regressions for 64-bit
PowerPC Linux and 64-bit AIX. With -O1, GCC produces invalid assembly
language, as shown by the following diff:
--- Lisp.s Thu Jun 27 17:59:18 2002
+++ Lisp.s.bad Thu Jun 27 17:59:14 2002
@@ -58,11 +58,11 @@
bl .LispNewCons
nop
std 3,8(30)
- stfd 31,120(31)
- ld 0,120(31)
+ stfd 31,8()
+ ld 0,8()
addic. 0,0,-1
- std 0,120(31)
- lfd 31,120(31)
+ std 0,8()
+ lfd 31,8()
bne+ 0,L..20
L..16:
mr 3,31
"8()" is an invalid address -- this should be a displacement from a
register number inside the parentheses.
At -O2, GCC ICEs:
Lisp.c: In function `Lisp_Makearray':
Lisp.c:32: Internal compiler error in sched_analyze_2, at sched-deps.c:758
Both failure modes look like the function.c change causing
corrupted RTL, e.g., a wild write.
The testcase does not fail in 32-bit mode, but I doubt this is a
bug in the 64-bit support, probably just different sequence of events.
This needs to be fixed or reverted on both the trunk and GCC 3.1
release branch.
Thanks, David
More information about the Gcc-patches
mailing list