Fix process comparison compile error with --public-flat-rw (#7592).

Fixes #7592.
This commit is contained in:
Wilson Snyder
2026-05-15 18:22:46 -04:00
parent 349dd546e7
commit c1ab369da2
4 changed files with 32 additions and 17 deletions
+1 -1
View File
@@ -5496,7 +5496,7 @@ AstFunc* V3Randomize::newSRandomFunc(VMemberMap& memberMap, AstClass* nodep) {
// For std::process, seed the per-process RNG via m_process->srandom()
// For regular classes, seed the per-object RNG via __Vm_rng
if (basep->name() == "process") {
funcp->addStmtsp(new AstCStmt{basep->fileline(), "__PVT__m_process->srandom(seed);"});
funcp->addStmtsp(new AstCStmt{basep->fileline(), "m_process->srandom(seed);"});
} else {
funcp->addStmtsp(new AstCStmt{basep->fileline(), "__Vm_rng.srandom(seed);"});
basep->needRNG(true);