diff --git a/configure.ac b/configure.ac index f4b209e27..066b6f47d 100644 --- a/configure.ac +++ b/configure.ac @@ -419,6 +419,7 @@ AC_LINK_IFELSE( CFG_WITH_THREADED=$_my_result AC_SUBST(CFG_WITH_THREADED) AC_MSG_RESULT($CFG_WITH_THREADED) +CXXFLAGS="$ACO_SAVE_CXXFLAGS" # Check compiler flag if test "$CFG_WITH_THREADED" = "no" ; then diff --git a/src/V3CCtors.cpp b/src/V3CCtors.cpp index 962b382f9..2d56c83a9 100644 --- a/src/V3CCtors.cpp +++ b/src/V3CCtors.cpp @@ -146,13 +146,11 @@ void V3CCtors::cctorsAll() { modp = VN_CAST(modp->nextp(), NodeModule)) { // Process each module in turn { - AstCFunc* varResetFuncp; V3CCtorsVisitor var_reset( modp, "_ctor_var_reset", (VN_IS(modp, Class) ? EmitCBaseVisitor::symClassVar() : ""), (VN_IS(modp, Class) ? "vlSymsp" : ""), (VN_IS(modp, Class) ? "if (false && vlSymsp) {} // Prevent unused\n" : "")); - varResetFuncp = var_reset.builtFuncp(); for (AstNode* np = modp->stmtsp(); np; np = np->nextp()) { if (AstVar* varp = VN_CAST(np, Var)) { diff --git a/src/V3EmitC.cpp b/src/V3EmitC.cpp index 95bfea103..df270ae4a 100644 --- a/src/V3EmitC.cpp +++ b/src/V3EmitC.cpp @@ -1655,7 +1655,7 @@ class EmitCImp : EmitCStmts { string cvtarray = (adtypep->subDTypep()->isWide() ? ".data()" : ""); return emitVarResetRecurse(varp, adtypep->subDTypep(), depth + 1, ".atDefault()" + cvtarray); - } else if (AstClassRefDType* adtypep = VN_CAST(dtypep, ClassRefDType)) { + } else if (VN_IS(dtypep, ClassRefDType)) { return ""; // Constructor does it } else if (AstDynArrayDType* adtypep = VN_CAST(dtypep, DynArrayDType)) { // Access std::array as C array