https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111510
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-13 branch has been updated by Gaius Mulley <ga...@gcc.gnu.org>: https://gcc.gnu.org/g:b92cddb94874df4b9451d9cea3efa88f0654981b commit r13-7842-gb92cddb94874df4b9451d9cea3efa88f0654981b Author: Gaius Mulley <gaiusm...@gmail.com> Date: Tue Sep 26 19:39:59 2023 +0100 PR modula2/111510 runtime ICE findChildAndParent has caused internal runtime error This patch fixes the runtime bug above. The full runtime message is: findChildAndParent has caused internal runtime error, RTentity is either corrupt or the module storage has not been initialized yet. The bug is due to a non nul terminated string determining the module initialization order. This results in modules being uninitialized and the above crash. The bug manifests itself on 32 bit systems - but obviously is latent on all targets and the fix should be applied to both gcc-14 and gcc-13. gcc/m2/ChangeLog: PR modula2/111510 * gm2-compiler/M2GenGCC.mod (IsExportedGcc): Minor spacing changes. (BuildTrashTreeFromInterface): Minor spacing changes. * gm2-compiler/M2Options.mod (GetRuntimeModuleOverride): Call string to generate a nul terminated C style string. * gm2-compiler/M2Quads.mod (BuildStringAdrParam): New procedure. (BuildM2InitFunction): Replace inline parameter generation with calls to BuildStringAdrParam. (cherry picked from commit 53daf67fd55e005e37cb3ab33ac0783a71761de9) Signed-off-by: Gaius Mulley <gaiusm...@gmail.com>