From: johanknol Date: Mon, 12 Nov 2001 10:14:26 +0000 (+0000) Subject: fixed bug #480712 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=e582683bfcb421e470ccc5854e77507295648830;p=fw%2Fsdcc fixed bug #480712 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1573 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/src/SDCCsymt.c b/src/SDCCsymt.c index afedc3e5..ab5d588e 100644 --- a/src/SDCCsymt.c +++ b/src/SDCCsymt.c @@ -1582,10 +1582,12 @@ aggregateToPointer (value * val) DCL_TYPE (val->type) = PPOINTER; break; case S_FIXED: + if (SPEC_OCLS(val->etype)) { DCL_TYPE(val->type)=PTR_TYPE(SPEC_OCLS(val->etype)); - - if (TARGET_IS_DS390) - { + } else { + // this should not happen + fprintf (stderr, "wild guess about storage type\n"); + if (TARGET_IS_DS390) { /* The AUTO and REGISTER classes should probably * also become generic pointers, but I haven't yet * devised a test case for that. @@ -1593,9 +1595,10 @@ aggregateToPointer (value * val) DCL_TYPE (val->type) = GPOINTER; break; } - if (options.model==MODEL_LARGE) { - DCL_TYPE (val->type) = FPOINTER; - break; + if (options.model==MODEL_LARGE) { + DCL_TYPE (val->type) = FPOINTER; + break; + } } break; case S_AUTO: diff --git a/src/mcs51/gen.c b/src/mcs51/gen.c index ca41f6c7..1324289e 100644 --- a/src/mcs51/gen.c +++ b/src/mcs51/gen.c @@ -2626,6 +2626,8 @@ genRet (iCode * ic) { int size, offset = 0, pushed = 0; + D(emitcode (";", "genRet")); + /* if we have no return value then just generate the "ret" */ if (!IC_LEFT (ic))