From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1D7BC3858D32; Sun, 7 May 2023 18:14:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1D7BC3858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683483264; bh=PeN2WJstCcfQgHDeOBgPF/xUyWS3Na6EzFJ7VCGFORg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=wAKnPGpsbg9vSRpyYQLPZXBmyRreevRAK/7rIdGRALjfsrA9vZPf29bMFRUDLGDXE 3HcmeZscpHlcyiO9yLo7jK7KNAxmh3bZ9iGxYdF6wQPBXbspRdfdxzRAEGMY40fKvo 2QE1UDta43HBuuRl/Ix4If9owIyLUgONvpNdgQ/8= From: "jvdelisle at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libfortran/109662] bad namelist input but gfortran accepted it Date: Sun, 07 May 2023 18:14:23 +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: 12.1.0 X-Bugzilla-Keywords: accepts-invalid X-Bugzilla-Severity: normal X-Bugzilla-Who: jvdelisle at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED 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=3D109662 --- Comment #12 from Jerry DeLisle --- A additional adjustment to reject the semi-colon always. diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c index 78bfd9e8787..db3330060ce 100644 --- a/libgfortran/io/list_read.c +++ b/libgfortran/io/list_read.c @@ -3598,9 +3598,9 @@ find_nml_name: /* A trailing space is required, we allow a comma with std=3Dgnu. */ c =3D next_char (dtp); - if (c =3D=3D ',' && !(compile_options.allow_std & GFC_STD_GNU)) + if ((c =3D=3D ',' && !(compile_options.allow_std & GFC_STD_GNU)) || c = =3D=3D ';') generate_error (&dtp->common, LIBERROR_READ_VALUE, - "Comma after namelist name not allowed"); + "Non blank after namelist name not allowed"); if (!is_separator(c) && c !=3D '!') {=