https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112506
--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Gaius Mulley <ga...@gcc.gnu.org>: https://gcc.gnu.org/g:75f49cf82e06971b066b4f440256004775603752 commit r14-8684-g75f49cf82e06971b066b4f440256004775603752 Author: Gaius Mulley <gaiusm...@gmail.com> Date: Thu Feb 1 10:24:02 2024 +0000 PR modula2/111627 defend against ICE Although PR 111627 can be fixed by renaming testsuite modules it highlighted that a possible ICE can occur if a malformed implementation module is actually a program module. This small patch defends against this ICE and checks to see whether the module is a DefImp before testing IsDefinitionForC. gcc/m2/ChangeLog: PR modula2/111627 PR modula2/112506 * gm2-compiler/M2Comp.mod (Pass0CheckMod): Test IsDefImp before checking IsDefinitionForC. Signed-off-by: Gaius Mulley <gaiusm...@gmail.com>