From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 18BFB3858C2B; Sun, 7 May 2023 21:55:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 18BFB3858C2B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683496550; bh=KoVtyIqg5W5blAGH80CdL1Lchc56LHdk50voaG0JsVY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=t1K1NHQqoA4ySbPw/yVe2AmJy9j1BvfKIq3AjPzzRG/DeAr4Cyz8fu7vWL/9rc80G OmS8MzdwANrm8M6caY3xLUcIHdflCwckZ9H/Oh19OKehHI+XuXYVRussJOevTrMi+h 6aU5HXbBEPMJha3dRU+VBNbdBBLxFdUsW6GxuSuU= From: "john.harper at vuw dot ac.nz" To: gcc-bugs@gcc.gnu.org Subject: [Bug libfortran/109662] bad namelist input but gfortran accepted it Date: Sun, 07 May 2023 21:55:49 +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: john.harper at vuw dot ac.nz 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 #15 from john.harper at vuw dot ac.nz --- Sorry: what I should have said was that If and only if a comma after a namelist name was a pre-2003 possibility=20 for gfortran then it makes sense to reject a semicolon there when the=20 decimal edit mode is COMMA, which first got into the standard with f2003. John H On Sun, 7 May 2023, john.harper at vuw dot ac.nz wrote: > Date: Sun, 7 May 2023 21:46:33 +0000 > From: john.harper at vuw dot ac.nz > To: John Harper > Subject: [Bug libfortran/109662] bad namelist input but gfortran accepted= it > Resent-Date: Mon, 8 May 2023 09:46:44 +1200 (NZST) > Resent-From: >=20 > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109662 > > --- Comment #14 from john.harper at vuw dot ac.nz --- > Rejecting a semicolon after the namelist name even if the decimal edit > mode is COMMA makes sense because COMMA was first allowed in f2003, > provided that semicolons in namelist were a pre-f2003 legacy possibility. > > John H > > On Sun, 7 May 2023, jvdelisle at gcc dot gnu.org wrote: > >> Date: Sun, 7 May 2023 18:14:23 +0000 >> From: jvdelisle at gcc dot gnu.org >> To: John Harper >> Subject: [Bug libfortran/109662] bad namelist input but gfortran accepte= d it >> Resent-Date: Mon, 8 May 2023 06:14:37 +1200 (NZST) >> Resent-From: >> >> 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 '!') >> { >> >> -- >> You are receiving this mail because: >> You reported the bug. >> > > > -- John Harper, School of Mathematics and Statistics > Victoria Univ. of Wellington, PO Box 600, Wellington 6140, New Zealand. > e-mail john.harper@vuw.ac.nz phone +64(0) 4 463 5276 > > --=20 > You are receiving this mail because: > You reported the bug. > -- John Harper, School of Mathematics and Statistics Victoria Univ. of Wellington, PO Box 600, Wellington 6140, New Zealand. e-mail john.harper@vuw.ac.nz phone +64(0) 4 463 5276=