From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 69BCB3858D1E; Sat, 6 Apr 2024 03:02:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 69BCB3858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1712372569; bh=uiVvZOorB9255pqkSExo6BBIQNiyV4XOq470jKwYWKA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=sHWMxwHqy+xHEIY5bG8Tgxkf8gkpuaS+T5NzLxwARvQJXlJceucObR1Xe7T80GUzj sUErNEqj6tFnIHAT2hIdh9FRJlAbDaIhmFfXkIM8aMOI9sHnQQxTdQglTW2SXa38yt P7zeONH/pCkspnpihAwHXjV6bCdaeySDnsM+ZE08= From: "gaius at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug modula2/114617] gm2 is unable to resolve const expression using relative operators ICE Date: Sat, 06 Apr 2024 03:02:49 +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=3D114617 --- Comment #2 from Gaius Mulley --- Created attachment 57891 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D57891&action=3Dedit Proposed fix Here is a proposed fix which stores the result of the relop as a constant. The fix requires M2Quads to mark a const expression relop and M2GenGCC to evaluate the relop and then to remove the redundant quadruples.=