From 7b6472278bf0cccb72eca66ccf81121b407b0eef Mon Sep 17 00:00:00 2001 From: Walter Bright Date: Fri, 11 May 2012 12:23:45 -0700 Subject: [PATCH] fix latent seg fault --- src/toir.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/toir.c b/src/toir.c index 437afe421137..d5be6dd1283e 100644 --- a/src/toir.c +++ b/src/toir.c @@ -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) @@ -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;