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 c/13557] New: GCC generates code that differs from the SPARC 64-bit System V psABI


Consider the following bit of code:

struct sf { float f; };

struct sf xf;

void
foo (struct sf zf)
{
  xf = zf;
}

According to the SPARC 64-bit System V psABI this particular structure should be
passed in the %f0 register.  GCC passes the structure in %f1, which is what one
would expect for the following code:

float xf;

void
foo (float zf)
{
  xf = zf;
}

I discovered the problem while working on GDB.  I can work around the problem
there.  However it means that GCC is incompatible with the Sun compilers on
Solaris, which do pass the structure in %f0.

-- 
           Summary: GCC generates code that differs from the SPARC 64-bit
                    System V psABI
           Product: gcc
           Version: 3.3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kettenis at gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: sparc64-unknown-freebsd5.2
  GCC host triplet: sparc64-unknown-freebsd5.2
GCC target triplet: sparc64-unknown-freebsd5.2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13557


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