-
Notifications
You must be signed in to change notification settings - Fork 15.3k
Open
Labels
ABIApplication Binary InterfaceApplication Binary InterfacebugzillaIssues migrated from bugzillaIssues migrated from bugzillac++clang:codegenIR generation bugs: mangling, exceptions, etc.IR generation bugs: mangling, exceptions, etc.
Description
| Bugzilla Link | 42642 |
| Version | unspecified |
| OS | All |
| Reporter | LLVM Bugzilla Contributor |
| CC | @dwblaikie,@DougGregor,@zygoloid,@TNorthover |
Extended Description
When you create a trivial aggregate containing std::nullptr_t, it does not get passed through RDI/RSI, but gets classified as a memory arg
E.g.:
struct MyVar1 {
int x = 3;
std::nullptr_t n = nullptr;
};
void Foo(MyVar1 x);
void CallMyVar1() {
MyVar1 m;
Foo(m); // Sets up stack frame and passes as pointer / MEMORY
}GCC does this correct.
More elaborate examples: https://gcc.godbolt.org/z/IxLudk
Metadata
Metadata
Assignees
Labels
ABIApplication Binary InterfaceApplication Binary InterfacebugzillaIssues migrated from bugzillaIssues migrated from bugzillac++clang:codegenIR generation bugs: mangling, exceptions, etc.IR generation bugs: mangling, exceptions, etc.