From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C54143858D35; Sat, 21 Oct 2023 16:37:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C54143858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1697906236; bh=LA8b44pwyF1CI6voRCHOchkmdWTk4kWfq3i/hqzSxdY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=OblD3wGAWjDOi0k+W2fxMOVHGasqNMVoz4ZYok6sPfk2O4Y4rh5DojU8P3WVZpTPT mLyg+oTOSaliDZGS1V1BGd5792H/f5voHn7plKfssskQ9AvdBPkKsGL+HjlAZwXJdA KEQaKVv2eXnYGHHBj4KSlO0jWZJ8iYGs7ewXIlCQ= From: "mikael at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/111781] Fortran compiler complains about variable bound in array dummy argument Date: Sat, 21 Oct 2023 16:37:15 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 12.2.0 X-Bugzilla-Keywords: patch X-Bugzilla-Severity: normal X-Bugzilla-Who: mikael at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: mikael at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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=3D111781 --- Comment #3 from Mikael Morin --- I'm trying to remove the formal_arg_flag global variables, which seem to ju= st disable all the checks on dummy arguments. Unfortunately, it regresses a bit, say pr101026.f for example can be simpli= fied to this: SUBROUTINE PASSB4 (CC,CH) DIMENSION CC(IDO,4,L1), CH(IDO,L1,*) END which gives: pr101026.f:4:19: 4 | DIMENSION CC(IDO,4,L1), CH(IDO,L1,*) | 1 Error: Variable =E2=80=98ido=E2=80=99 cannot appear in the expression at (1) pr101026.f:4:33: 4 | DIMENSION CC(IDO,4,L1), CH(IDO,L1,*) | 1 Error: Variable =E2=80=98ido=E2=80=99 cannot appear in the expression at (1) pr101026.f:4:25: 4 | DIMENSION CC(IDO,4,L1), CH(IDO,L1,*) | 1 Error: Variable =E2=80=98l1=E2=80=99 cannot appear in the expression at (1) pr101026.f:4:37: 4 | DIMENSION CC(IDO,4,L1), CH(IDO,L1,*) | 1 Error: Variable =E2=80=98l1=E2=80=99 cannot appear in the expression at (1) What I don't see is what makes the IDO and L1 variables acceptable in a specification expression. It seems to me the errors above are valid.=