From 7681e58d516c9b28d7d12049e3ec6423fd0ca50c Mon Sep 17 00:00:00 2001 From: Ryszard Rozak Date: Tue, 24 Feb 2026 12:51:44 +0100 Subject: [PATCH] Don't accept unpacked unions Signed-off-by: Ryszard Rozak --- src/V3Force.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/V3Force.cpp b/src/V3Force.cpp index 2c57a4a29..9eab4ff47 100644 --- a/src/V3Force.cpp +++ b/src/V3Force.cpp @@ -265,7 +265,7 @@ private: if (const AstUnpackArrayDType* const udtp = VN_CAST(dtp, UnpackArrayDType)) { const size_t elemsInSubDType = checkIfDTypeSupportedRecurse(udtp->subDTypep(), varp); return udtp->elementsConst() * elemsInSubDType; - } else if (const AstNodeUOrStructDType* const sdtp = VN_CAST(dtp, NodeUOrStructDType)) { + } else if (const AstStructDType* const sdtp = VN_CAST(dtp, StructDType)) { size_t elemCount = 0; for (const AstMemberDType* mdtp = sdtp->membersp(); mdtp; mdtp = VN_AS(mdtp->nextp(), MemberDType)) {