From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B055C3858D3C; Sun, 14 May 2023 01:30:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B055C3858D3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1684027828; bh=obTRTMaavtds4Xe6f5Q/uDVr/Pw1vZF28efwuLbOmK0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=AfFa55TCNNbxH9h0iwNJge4iUluKc7DGXDIwkeBL6dCVA9f7y0rl7jcjScK0pL5Ls Z3P9fiypTCJbsiTLs+7IBUhElmNXsJBBlWVO4l2obnmN5cm8clAlKkLUEYdKJl3ai0 rreiFVC0i8pmd/E8ML5ClkveMfy+0w2M0EvAMZ2I= From: "jvdelisle at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libfortran/107068] Run-time error when reading logical arrays with a namelist Date: Sun, 14 May 2023 01:30:21 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libfortran X-Bugzilla-Version: 11.2.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jvdelisle at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jvdelisle 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=3D107068 --- Comment #6 from Jerry DeLisle --- What is happening here is that in the name list input, the variable flp is = also a legal LOGICAL value, so our read is interpreting it as the second value of the array flc and trying to continue to read values for flc. It encounters = the ( and throws the error. To resolve this, I think I will have to check for a valid variable name for each value. [aside: A lot of these issues stem from the weaknesses in how namelists are interpreted. There are ambiguities in the specification.] My next step here is to go through the F2018 standard just to make sure wha= t we do is valid or invalid. (cheers)=