From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CAE973857C41; Thu, 7 Mar 2024 17:09:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CAE973857C41 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1709831358; bh=3ZxADZP7NF0kHj1C5syymCdb6+q5SUEWhXUtIPRZmqQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=IRZOPs4+zpf+EnGAk0jLONMKFOj1LAUMq7GbehZoy1djy5pBfOIcGaCrxsT07uA9t oz3pSj14LNOEy9MPeNPApcPAI0LFhV2aF6vf+XXOxX8aS0WxfgEUQWPcW3JkQx21Ih kQvZOWhBUrOOhsIoAmcB+GJzo2spPa6bD+6hxyiM= From: "gaius at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug modula2/109969] Linking large project causes an ICE Date: Thu, 07 Mar 2024 17:09:18 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: modula2 X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gaius at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: gaius at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109969 --- Comment #2 from Gaius Mulley --- Created attachment 57647 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D57647&action=3Dedit 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 f= or 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 o= ccur as there are issues with the test Makefile.=