Fix unresolved typedefs as parameters (#5850).

This commit is contained in:
Wilson Snyder
2025-03-19 18:02:56 -04:00
parent 4a2212949e
commit 39bdd427d6
4 changed files with 76 additions and 1 deletions
+4
View File
@@ -778,6 +778,10 @@ class ParamProcessor final {
<< modvarp->prettyNameQ());
} else {
UINFO(9, "Parameter type assignment expr=" << exprp << " to " << origp << endl);
V3Const::constifyParamsEdit(pinp->exprp()); // Reconcile typedefs
// Constify may have caused pinp->exprp to change
rawTypep = VN_AS(pinp->exprp(), NodeDType);
exprp = rawTypep->skipRefToNonRefp();
if (exprp->similarDType(origp)) {
// Setting parameter to its default value. Just ignore it.
// This prevents making additional modules, and makes coverage more