From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DCC333855030; Mon, 2 Aug 2021 21:08:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DCC333855030 From: "anlauf at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/101735] New: Type parameter inquiries for substrings are rejected Date: Mon, 02 Aug 2021 21:08:34 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: anlauf at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Aug 2021 21:08:35 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101735 Bug ID: 101735 Summary: Type parameter inquiries for substrings are rejected Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: anlauf at gcc dot gnu.org Target Milestone: --- As noted by Tobias Burnus in pr100950, type parameter inquiries (see e.g. F2018:9.4.5) are not recognized for substrings. character(len=3D5) :: str integer, parameter :: j =3D str% kind ! accepted (ok) integer, parameter :: k =3D str% len ! accepted (ok) integer, parameter :: l =3D str(1:3)% len ! not accepted integer, parameter :: m =3D str(1:3)% kind ! not accepted end gives: pr100950-inq.f90:4:25: 4 | integer, parameter :: l =3D str(1:3)% len ! not accepted | 1 Error: Parameter 'str' at (1) has not been declared or is a variable, which does not reduce to a constant expression pr100950-inq.f90:5:25: 5 | integer, parameter :: m =3D str(1:3)% kind ! not accepted | 1 Error: Parameter 'str' at (1) has not been declared or is a variable, which does not reduce to a constant expression=