https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80178
Bug ID: 80178 Summary: Class with implicitly deleted copy and move constructors usees wrong argument passing ABI Product: gcc Version: 6.3.1 Status: UNCONFIRMED Keywords: ABI Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org Target Milestone: --- We pass this in a register, but I think the ABI says it should be an invisible reference, because both the copy ctor and move ctor are deleted. struct A { A(); A &operator=(A &&o); void *p; }; void foo(A); void bar() { foo({}); } In this example they're implicitly defined as deleted because of the user-provided move assignment operator, but the result is the same whether implicitly or explicitly deleted. EDG passes this by invisible reference. Clang passes by value, but that's acknowledged to be a bug.