[LLVMbugs] [Bug 1787] New: x86 long double not passed according to the ABI

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Fri Nov 9 06:17:59 PST 2007


           Summary: x86 long double not passed according to the ABI
           Product: new-bugs
           Version: unspecified
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: baldrick at free.fr
                CC: llvmbugs at cs.uiuc.edu

If I pass two long doubles from a routine compiled with llvm-gcc to a routine
compiled with mainline gcc, then the second value is not passed right.

$ gcc -c ld_gcc.c
$ llvm-gcc -c ld_llvm.c
$ gcc -o x ld_llvm.o ld_gcc.o && ./x
1       0

If I recompile using only gcc, then all is well:
$ gcc -c ld_llvm.c
$ gcc -o x ld_llvm.o ld_gcc.o && ./x
1       1

First observed when calling the long double math library functions.


#include <stdio.h>
void p(long double d, long double e) {
  printf("%g    %g\n", (double)d, (double)e);


extern void p(long double, long double);
int main(void) {
  p(1.0, 1.0);
  return 0;

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list