Fix compound types in anonymous structs (#8449)

Signed-off-by: Artur Bieniek <[email protected]>
This commit is contained in:
Artur Bieniek
2026-09-22 12:41:11 -04:00
committed by GitHub
parent 08c9032927
commit f04eb8de81
3 changed files with 57 additions and 2 deletions
+1 -2
View File
@@ -74,8 +74,7 @@ public:
return v3Global.opt.compLimitMembers() != 0 // Enabled
&& !varp->isStatic() // Not a static variable
&& !varp->isSc() // Aggregates can't be anon
&& !VN_IS(dtp, SampleQueueDType) // Aggregates can't be anon
&& !(VN_IS(dtp, NodeUOrStructDType) && !VN_CAST(dtp, NodeUOrStructDType)->packed())
&& !dtp->isCompound() // Non-POD members are not allowed in an anonymous aggregate
&& (varp->basicp() && !varp->basicp()->isOpaque()); // Aggregates can't be anon
}
static bool isConstPoolMod(const AstNode* modp) {