From d532a367398aaddcbd4482be91c3e58b5e01e568 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Fri, 2 May 2014 08:14:23 -0400 Subject: [PATCH] Fix change detection error on unions, bug758. --- Changes | 2 ++ src/V3Changed.cpp | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Changes b/Changes index 14cacb059..8d06ffb23 100644 --- a/Changes +++ b/Changes @@ -39,6 +39,8 @@ indicates the contributor was also the author of the fix; Thanks! **** Fix reporting struct members as reserved words, bug741. [Chris Randall] +**** Fix change detection error on unions, bug758. [Jie Xu] + **** Fix Mac OS-X test issues. [Holger Waechtler] **** Fix C++-2011 warnings. diff --git a/src/V3Changed.cpp b/src/V3Changed.cpp index 98804f9e6..f1eb5a0e2 100644 --- a/src/V3Changed.cpp +++ b/src/V3Changed.cpp @@ -84,16 +84,16 @@ private: AstVar* varp = vscp->varp(); vscp->v3warn(IMPERFECTSCH,"Imperfect scheduling of variable: "<dtypeSkipRefp()->castUnpackArrayDType(); - AstStructDType *structp = varp->dtypeSkipRefp()->castStructDType(); + AstNodeClassDType *classp = varp->dtypeSkipRefp()->castNodeClassDType(); bool isArray = arrayp; - bool isStruct = structp && structp->packedUnsup(); + bool isClass = classp && classp->packedUnsup(); int elements = isArray ? arrayp->elementsConst() : 1; if (isArray && (elements > DETECTARRAY_MAX_INDEXES)) { vscp->v3warn(E_DETECTARRAY, "Unsupported: Can't detect more than "<prettyName()<warnMore() <<"... Could recompile with DETECTARRAY_MAX_INDEXES increased to at least "<dtypeSkipRefp()->castBasicDType()) { if (debug()) varp->dumpTree(cout,"-DETECTARRAY-"); vscp->v3warn(E_DETECTARRAY, "Unsupported: Can't detect changes on complex variable (probably with UNOPTFLAT warning suppressed): "<prettyName());