This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/12538] New: sparc bug: gcc -mflat -fpic: l7 clobbered
- From: "fjh at cs dot mu dot oz dot au" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Oct 2003 09:38:28 -0000
- Subject: [Bug target/12538] New: sparc bug: gcc -mflat -fpic: l7 clobbered
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12538
Summary: sparc bug: gcc -mflat -fpic: l7 clobbered
Product: gcc
Version: 3.2
Status: UNCONFIRMED
Severity: minor
Priority: P2
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: fjh at cs dot mu dot oz dot au
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: sparc-sun-solaris2.8
GCC host triplet: sparc-sun-solaris2.8
GCC target triplet: sparc-sun-solaris2.8
The attached source files demonstrate a bug with gcc-2.95.1 and gcc 3.2
on SPARCs.
The bug is that if you compile one file with no special options
(or with just `-mflat', or just `-fpic', but not both), and
another file with `-mflat -fpic', and link the two together, then in
the file compiled with no special options it treats register l7 as
a callee-save register, but in the file compiled with `-mflat -fpic'
it clobbers register l7 without saving it.
The attached program should output "1,2,3,4,5,6,7,8,9,10",
but on my system the program gets a Segmentation Fault instead.