-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzilla
Description
| Bugzilla Link | 1787 |
| Resolution | FIXED |
| Resolved on | Nov 10, 2007 16:10 |
| Version | unspecified |
| OS | Linux |
| Reporter | LLVM Bugzilla Contributor |
Extended Description
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.
ld_gcc.c:
#include <stdio.h>
void p(long double d, long double e) {
printf("%g %g\n", (double)d, (double)e);
}
ld_llvm.c:
extern void p(long double, long double);
int main(void) {
p(1.0, 1.0);
return 0;
}
Metadata
Metadata
Assignees
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzilla