diff --git a/gen/abi-x86-64.cpp b/gen/abi-x86-64.cpp index 8a94af1f..898f266c 100644 --- a/gen/abi-x86-64.cpp +++ b/gen/abi-x86-64.cpp @@ -563,6 +563,7 @@ bool X86_64TargetABI::returnInArg(TypeFunction* tf) { } bool X86_64TargetABI::passByVal(Type* t) { + t = t->toBasetype(); if (linkage() == LINKd) { if (t->ty != Tstruct) return false; diff --git a/gen/functions.cpp b/gen/functions.cpp index 2041e9ac..19023ae0 100644 --- a/gen/functions.cpp +++ b/gen/functions.cpp @@ -185,7 +185,7 @@ const llvm::FunctionType* DtoFunctionType(Type* type, Type* thistype, Type* nest } // reverse params? - if (f->fty->reverseParams && f->parameters->dim > 1) + if (f->fty->reverseParams && nargs2 > 1) { std::reverse(argtypes.begin() + beg, argtypes.end()); }