This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/12538] New: sparc bug: gcc -mflat -fpic: l7 clobbered


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]