From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 956C43858D20; Wed, 21 Feb 2024 01:46:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 956C43858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1708479996; bh=NNIbsCbam8HEU14j3yRSg2Ui1YKY9dmfNtS3bhiepU0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ZroVgZkvQD63TQ1q7l9n5jhODrA0NOA80zUCsYAfgatxBAa9n3L7FrHNH7OP46TzM CJPWacK1gorhJ6eRS97GH/uYKVN42BdZinIw0ux9X2g7HZWN1LRpYa4Eo3P1cSzWDo rUIO8xiFM0gaDav1EGlX6zQoBs44/aEzRgPgd2vM= From: "gaius at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug modula2/114026] incorrect location during for loop type check Date: Wed, 21 Feb 2024 01:46:36 +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=3D114026 --- Comment #2 from Gaius Mulley --- Created attachment 57474 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D57474&action=3Dedit Proposed fix Here is the proposed fix. $ gm2 forloop.mod=20 forloop.mod:10:8: error: In procedure =E2=80=98init=E2=80=99: type expressi= on incompatibility between =E2=80=98INTEGER=E2=80=99 and =E2=80=98CARDINAL=E2=80=99 detected w= hen comparing the designator =E2=80=98i=E2=80=99 against the second expression =E2=80=98c=E2=80=99 in the FOR loop 10 | FOR i :=3D 0 TO c DO (* INTEGER CARDINAL expression incompatib= le.=20 *) | ^~~~~~~~~~~=