From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 80740385DC10; Mon, 30 Mar 2020 16:41:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 80740385DC10 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1585586472; bh=oW3cyexvYl8HIoa1+Hs/qr8O9xi5DiNNM+57hfFa8Sk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=S60i7xLsoeQqYXi/Rjd0/t4EiDJ3M6v/07hpaVk0lV6uK7h8JCnVexZX6SNRKtL/j FTh2GQqWyqtyMS1a7tfnTpA9ZmjLraIg23t4dRlGO5qP64yI6SSBPkgRiIeS2zjLn0 76DgVhSe9xXBLfd8Hl7Aa0vYqZWn9nRGj4w7dKFw= From: "sgk at troutmask dot apl.washington.edu" 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: Mon, 30 Mar 2020 16:41:12 +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: sgk at troutmask dot apl.washington.edu 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: Mon, 30 Mar 2020 16:41:12 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94397 --- Comment #3 from Steve Kargl -= -- On Mon, Mar 30, 2020 at 04:23:11PM +0000, kargl at gcc dot gnu.org wrote: >=20 > --- Comment #2 from kargl at gcc dot gnu.org --- > (In reply to Martin Li=C5=A1ka from comment #1) > > Confirmed, started with r10-7369-gc38daa7976886a59. >=20 > Patch in the linked git revision appears to expose a latent > bug in TYPE IS(). Two workarounds are to use either >=20 > type is (real(4)) ! Bad, because of hard coded kind parameter >=20 > or >=20 > integer, parameter :: sp =3D kind(1.) > ... > type is (real(sp)) >=20 Untested patch against svn reverion 280157. Index: gcc/fortran/match.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- gcc/fortran/match.c (revision 280157) +++ gcc/fortran/match.c (working copy) @@ -2239,7 +2239,8 @@ found: a scalar integer initialization-expr and valid kind parameter. */ if (c =3D=3D ')') { - if (e->ts.type !=3D BT_INTEGER || e->rank > 0) + if (!gfc_reduce_init_expr (e) + || e->ts.type !=3D BT_INTEGER || e->rank > 0) { gfc_free_expr (e); return MATCH_NO;=