[LLVMbugs] [Bug 783] NEW: llvm-gcc[34] i386 ELF ABI struct return incompatibility
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Thu May 18 13:22:50 PDT 2006
http://llvm.org/bugs/show_bug.cgi?id=783
Summary: llvm-gcc[34] i386 ELF ABI struct return incompatibility
Product: tools
Version: 1.7
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: llvm-gcc
AssignedTo: unassignedbugs at nondot.org
ReportedBy: sabre at nondot.org
The ELF ABI specifies that struct returns are passed as a hidden first argument (we get this right).
However, the pointer itself is also supposed to be returned from the function in EAX. Thus, llvm-gcc
should compile:
struct X { int A, B; };
struct X foo() {}
to:
%struct.X* %foo(%struct.X* %agg.result) {
ret %struct.X* %agg.result
}
instead of:
void %foo(%struct.X* %agg.result) {
ret void
}
In practice, this is unlikely to make a difference, but it is still an ABI bug. This affects both llvm-gcc3
and llvm-gcc4.
-Chris
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
More information about the llvm-bugs
mailing list