mirror of
https://github.com/irmen/prog8.git
synced 2026-11-25 21:22:39 +00:00
Taking the address of a direct struct instance in static initializer data (pointer arrays and pointer-typed struct fields) worked on 6502 only. The typed `&&` operator already provides the needed type, but the IR path broke on targets without symbol prefixes: - The virtual target skips symbol prefixing, so address-of symbols kept their plain scoped names (`main.p1`) while the struct instance storage is registered as `prog8_struct_instances.main_p1`. IRUnusedCodeRemover then crashed with "no chunk with label 'main.p1'" (only when optimizing). StConvert now resolves both the plain scoped form and the p8i_->p8v_ prefixed form used on 6502 and m68k targets. - Both symbol prefixers rebuilt PtAddressOf nodes for static initializer elements without their typed/msb flags; the flags are now preserved.