fix for globals that use other globals in their inits

This commit is contained in:
Vern Paxson 2024-12-28 13:50:58 -08:00
parent 805e9db588
commit 68e1307ab3

View file

@ -63,6 +63,10 @@ void CPPCompile::Compile(bool report_uncompilable) {
(void)pfs->HashType(t); (void)pfs->HashType(t);
rep_types.insert(TypeRep(t)); rep_types.insert(TypeRep(t));
} }
for ( auto& g : pf->Globals() )
accessed_globals.insert(g);
for ( auto& ag : pf->AllGlobals() )
all_accessed_globals.insert(ag);
} }
} }