Skip to content

Commit

Permalink
fix latent seg fault
Browse files Browse the repository at this point in the history
  • Loading branch information
WalterBright committed May 11, 2012
1 parent 8a2a471 commit 7b64722
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/toir.c
Expand Up @@ -875,7 +875,7 @@ enum RET TypeFunction::retStyle()
#endif

if (tns->ty == Tstruct)
{ StructDeclaration *sd = ((TypeStruct *)tn)->sym;
{ StructDeclaration *sd = ((TypeStruct *)tns)->sym;
if (global.params.isLinux && linkage != LINKd && !global.params.is64bit)
return RETstack; // 32 bit C/C++ structs always on stack
if (sd->arg1type && !sd->arg2type)
Expand All @@ -900,9 +900,9 @@ enum RET TypeFunction::retStyle()
}
else if ((global.params.isLinux || global.params.isOSX || global.params.isFreeBSD || global.params.isSolaris) &&
linkage == LINKc &&
tn->iscomplex())
tns->iscomplex())
{
if (tn->ty == Tcomplex32)
if (tns->ty == Tcomplex32)
return RETregs; // in EDX:EAX, not ST1:ST0
else
return RETstack;
Expand Down

0 comments on commit 7b64722

Please sign in to comment.