From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 529A2385BF83; Wed, 1 Apr 2020 07:51:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 529A2385BF83 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1585727502; bh=EhsVzQI2biHD7NWaQD4UsLrzlwFT92OeNcn5RDaGBfA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=nQVV84OUDjh98ZxmkgEpah5q44ACLd9bBP0fYprrtUThI6wEpsi296mpOzn0DgSau XGLQYFeIv5dwQfqanYF/6CAY4KSbkHZISAeVnntmhzYNXBGaa8bPwzNM1rA6ZRCYN4 S2dIor5hngm1c1J+yZk0qDsFSbRPK+zFuPZNdv5Q= From: "markeggleston at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/94397] [10 Regression] the compiler consider "type is( real(kind(1.)) )" as a syntax error since r10-7369-gc38daa7976886a59 Date: Wed, 01 Apr 2020 07:51:42 +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: 10.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: markeggleston at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.0 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 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: Wed, 01 Apr 2020 07:51:42 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94397 --- Comment #6 from markeggleston at gcc dot gnu.org --- (In reply to kargl from comment #5) > (In reply to markeggleston from comment #4) > > The compilation error reported is due this change in PR93484: > >=20 > > --- a/gcc/fortran/match.c > > +++ b/gcc/fortran/match.c > > @@ -2222,9 +2222,9 @@ gfc_match_type_spec (gfc_typespec *ts) > >=20=20 > > found: > >=20=20 > > - m =3D gfc_match_init_expr (&e); > > + m =3D gfc_match_expr (&e); > >=20 > > Changing it back causes test cases ISO_Fortran_binding_11.f90 and > > pr78033.f90 to fail. > >=20 > > If "kind=3D" is found gfc_match_init_expr (&e) should be used and when = it is > > not gfc_match_expr (&e). > >=20 > > I'm checking a suitable test case and will have a patch ready soon. >=20 > The patch in comment #3 likely is the correct patch. When in the > specification part of a scoping unit, the above change is needed to > distinguish REAL(kind(1.)) from REAL(1.1, kind(1.)). In the former, > we have a type and kind(1.) must be an initialization expression > (see comment 3 or 4 lines down). In the latter case, we have the > intrinsic subprogram, and simply return MATCH_NO or MATCH_ERROR. >=20 > --=20 > steve Thanks Steve. Should've tried your patch earlier, it is much simpler than = mine and I've verified that it works. There was a nagging feeling that my soluti= on was incomplete. I'm happy to add test cases to your patch and send it upstr= eam for approval.=