This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/68214] New: gcc.dg/cwsc1.c fails on arm-none-eabi
- From: "sandra at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 04 Nov 2015 21:58:53 +0000
- Subject: [Bug target/68214] New: gcc.dg/cwsc1.c fails on arm-none-eabi
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68214
Bug ID: 68214
Summary: gcc.dg/cwsc1.c fails on arm-none-eabi
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: sandra at gcc dot gnu.org
Target Milestone: ---
Created attachment 36651
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36651&action=edit
cwsc1.s
The testcase gcc.dg/cwsc1.c seems to assume that register "ip" is always
reserved for the static chain pointer on ARM, but it's being re-used as a
temporary to hold the value of the variable "ptr" prior to calling it:
arm-none-eabi-gcc src/gcc-mainline/gcc/testsuite/gcc.dg/cwsc1.c -S -O
produces:
main:
@ Function supports interworking.
@ args = 0, pretend = 0, frame = 8
@ frame_needed = 0, uses_anonymous_args = 0
stmfd sp!, {r4, lr}
sub sp, sp, #8
add r4, sp, #7
mov ip, r4
ldr r3, .L6
ldr ip, [r3]
mov lr, pc
bx ip
cmp r4, r0
bne .L5
Invalid testcase or bug in the ARM backend?