Fix arrays of unpacked structs (#4173).

This commit is contained in:
Wilson Snyder
2023-05-06 21:41:17 -04:00
parent c6052830e1
commit 0606a29f13
9 changed files with 88 additions and 3 deletions
+1
View File
@@ -54,6 +54,7 @@ class EmitCGatherDependencies final : VNVisitorConst {
} else if (const AstNodeUOrStructDType* const dtypep
= VN_CAST(nodep, NodeUOrStructDType)) {
if (!dtypep->packed()) {
UASSERT_OBJ(dtypep->classOrPackagep(), nodep, "Unlinked struct package");
m_dependencies.insert(EmitCBase::prefixNameProtect(dtypep->classOrPackagep()));
}
}