diff --git a/src/V3Force.cpp b/src/V3Force.cpp index 9eab4ff47..2fd7d163e 100644 --- a/src/V3Force.cpp +++ b/src/V3Force.cpp @@ -355,6 +355,11 @@ private: enStructp = new AstStructDType{structp->fileline(), structp->packed() ? VSigning::SIGNED : VSigning::NOSIGN}; + } else if (VN_IS(structp, UnionDType) && structp->packed()) { + const AstUnionDType* const unionp = VN_AS(structp, UnionDType); + enStructp = new AstUnionDType{ + unionp->fileline(), unionp->isSoft(), unionp->isTagged(), + unionp->packed() ? VSigning::SIGNED : VSigning::NOSIGN}; } else { varp->v3fatalSrc("Unsupported: Force of variable of unhandled data type"); return dtypep;