http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49080
Summary: Wrong register allocation for even register
Product: gcc
Version: 4.6.1
Status: UNCONFIRMED
Keywords: ra, wrong-code
Severity: normal
Priority: P3
Component: rtl-optimization
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Target: s390-linux
Created attachment 24300
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24300
preprocessed source
glibc _itoa is miscompiled with
> ./cc1 -quiet -fpreprocessed _itoa.i -quiet -dumpbase _itoa.c -m31 -mesa -O2
> -std=gnu99 -fgnu89-inline -fmerge-all-constants -fno-strict-aliasing -fpic -o
> _itoa.s -march=z10 -mzarch -mtune=z196
(reproduced on a x86_64 -> s390-linux cross)
resulting in SIGILLs because mr needs an even numbered register as first
operand.
_itoa:
.LFB5:
stm %r6,%r15,24(%r15)
.LCFI8:
...
#APP
# 434 "_itoa.c" 1
lr %r14,%r1
mr %r13,%r10
#NO_APP
nr %r3,%r14