https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109969
--- Comment #2 from Gaius Mulley <gaius at gcc dot gnu.org> --- Created attachment 57647 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57647&action=edit Proposed fix Here is a proposed fix. The fix contains a re-write of M2LexBuf.mod which removes the linked list of token buckets and simplifies the implementation using a dynamic array. It contains more checking (for empty source files for example). The patch also contains a fix for an ICE in gcc/m2/gm2-gcc/builtins.cc - prompting this patch and potential commit once the bootstrap succeeds. Many of the test modules for this PR now compile. I've not seen the link occur as there are issues with the test Makefile.