From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com [68.232.141.98]) by sourceware.org (Postfix) with ESMTPS id 878A3385E032; Thu, 2 Apr 2020 07:50:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 878A3385E032 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Tobias_Burnus@mentor.com IronPort-SDR: 9roTDs1/uaE0iCEfdY9gY6XXCV2Lc+O3M7z0CHvsdsujRXWHtVDdn01X1qyH/qg7H9wqsO9ni9 4DbBZzjH/UHOdSC7XR9a51kTDcPyJArvaoX1noUhthovtD99OmOI81OlsKQcaZ8nmvkrRxWzgb dl1tELiEi2K6WCkiPJZ75hKvh22oCZf0KiK7pFtORlYyA9k2OX329EpjZRS6KiwKqw4HHzbVRh YzbPHpSMyZDfe/Cl7SoTP7d6f9kISrL5JOZUQ1vZ+kUD5vf7IGxR7Q80FCFuXJNZ++GMZsi2nF xSQ= X-IronPort-AV: E=Sophos;i="5.72,335,1580803200"; d="scan'208";a="47281432" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa2.mentor.iphmx.com with ESMTP; 01 Apr 2020 23:50:54 -0800 IronPort-SDR: sx3nUwYV2eSVjiEguI4LEO6xNkTYnwaxLbkLffIfnVHnBpLa8Djovkmfk8zDHagWj4ktSBlbPN KWRn9i+oBPZCbJWxWocibpWmGyvlkYEXbore5PfwV9PSYagsUujXVH3Iv6EMZzaqmqP0XkS5yh wujEaeaKOJqO8E/AglsyhPZaD4z/eB87pEu9OHIgUOumg+Ra9faDw8Fcz8c3UXLAm6hyfGjcUE 10ktHkoE99hPavzTf1loZM9v2LZ20I+sI0BPmJsdWf7R5PzlqXFh8wKW1NlCLaB28rJ5IezpVo Og8= Subject: Re: PING -- [PATCH, fortran] PR 85982 -- ICE in resolve_component To: Fritz Reese , fortran , gcc-patches References: From: Tobias Burnus Message-ID: <520bc574-7116-0a67-6985-7faade12dd66@codesourcery.com> Date: Thu, 2 Apr 2020 09:50:42 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: quoted-printable Content-Language: en-US X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: SVR-IES-MBX-07.mgc.mentorg.com (139.181.222.7) To SVR-IES-MBX-03.mgc.mentorg.com (139.181.222.3) X-Spam-Status: No, score=-15.7 required=5.0 tests=BAYES_00, GIT_PATCH_2, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Apr 2020 07:50:57 -0000 In principle, I like the patch. However, I think one should replace gfc_error ("Attribute at %L is not allowed in a %s definition", =E2=80=A6, state_name by something like: bool is_type =3D gfc_current_state () =3D=3D COMP_DERIVED; gfc_error (is_type ? G_("Attribute at %L is not allowed in a TYPE definitio= n") : G_("Attribute at %L is not allowed in a STRUCTURE defi= nition"), =E2=80=A6 Reason: (a) This makes translation simpler; e.g. 'structure' and 'type' hav= e different gender in several European languages. (Albeit in this case the gender of 'definition' dominates in the cases I checked.) (b) For TYPE, the string won't change such that the existing translations still work =E2=80=93 even if the update for STRUCTURE won't make it for the= release. Otherwise it looks good to me, including the test case in your follow-up em= ail. Cheers, Tobias On 4/1/20 7:19 PM, Fritz Reese via Fortran wrote: > This simple patch was submitted some time ago (over 1 year), but got > lost without review. I have lately rebased and tested, and the patch > is still good. Is this OK to commit to trunk and for backport? I'd > like to port as far back as 7. > > --- > Fritz Reese > > gcc/ChangeLog: > 2020-04-01 Fritz Reese > > PR fortran/85982 > * fortran/decl.c (match_attr_spec): Lump COMP_STRUCTURE/COMP_MAP = into > attribute checking used by TYPE. > > gcc/testsuite/ChangeLog: > 2020-04-01 Fritz Reese > > PR fortran/85982 > * gfortran.dg/dec_structure_28.f90: New test. ----------------- Mentor Graphics (Deutschland) GmbH, Arnulfstra=C3=9Fe 201, 80634 M=C3=BCnch= en / Germany Registergericht M=C3=BCnchen HRB 106955, Gesch=C3=A4ftsf=C3=BChrer: Thomas = Heurung, Alexander Walter