From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd33.google.com (mail-io1-xd33.google.com [IPv6:2607:f8b0:4864:20::d33]) by sourceware.org (Postfix) with ESMTPS id 89FFE388A01F; Thu, 2 Apr 2020 16:20:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 89FFE388A01F Received: by mail-io1-xd33.google.com with SMTP id o127so4280027iof.0; Thu, 02 Apr 2020 09:20:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=UPSEZLjvv3JW268VbQd/G8yzS0bkOu/eZ5ptJED3KOA=; b=Q3SH6xXT9bhfCDAq1zMLLdyPqeEnmysMtmU6iJRHUdB4VTi6HhpHNlNk8ZyaYcavM4 j9j5t0SMi0dZfSrWUAUBF6VILZSfwRJzcj/SjC42qeNMP6pktTlf13zCyjJPEKYjDbAx d5zVc6+9alm7cYuAw2bDZz5CEvlHaKbwNtY/dZwkmbj1UWAMuexe9frg9X0IqPN4tz8G 4tkJsYTXYwZirBQYmqmUWyY8LZ9coSlAwPztrE7PZSlgbIvFpyRzfBHXJtZvIHYZ69LV jBHGceVM4eTYLmnXPgaubekMfIUtcP9NTeUEerLhX7eH1x9/bfA8dQM0pXGaGg00rmZ5 IsAg== X-Gm-Message-State: AGi0PuYZ7ikDUv3bFj8V3UKbdZHIqNb6zTFpsBC00kSMsm71mXfMr5M7 yXEcVdijlQCx9hFzMAdRNWcnPNiAvywdpoVnXEw6SgBQ X-Google-Smtp-Source: APiQypJkZUS9++cwUq1JTu6vSh+b/tRX/E83XrKFBtlEwLiccpcZEaEES3epRD/ukq8spBdPMeXZrWU55dX70DLM2Gw= X-Received: by 2002:a05:6602:243c:: with SMTP id g28mr3484039iob.19.1585844440794; Thu, 02 Apr 2020 09:20:40 -0700 (PDT) MIME-Version: 1.0 References: <520bc574-7116-0a67-6985-7faade12dd66@codesourcery.com> In-Reply-To: <520bc574-7116-0a67-6985-7faade12dd66@codesourcery.com> From: Fritz Reese Date: Thu, 2 Apr 2020 12:20:28 -0400 Message-ID: Subject: Re: PING -- [PATCH, fortran] PR 85982 -- ICE in resolve_component To: Tobias Burnus Cc: fortran , gcc-patches Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_2, RCVD_IN_DNSWL_NONE, 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 16:20:42 -0000 Tobias, Thank you for the information. I didn't think about translations. I'll post a new version and commit shortly. Cheers, Fritz On Thu, Apr 2, 2020 at 3:50 AM Tobias Burnus wrot= e: > > 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 definit= ion") > : G_("Attribute at %L is not allowed in a STRUCTURE de= finition"), > =E2=80=A6 > > Reason: (a) This makes translation simpler; e.g. 'structure' and 'type' h= ave > 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 t= he release. > > Otherwise it looks good to me, including the test case in your follow-up = email. > > 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_MA= P 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=BCn= chen / Germany > Registergericht M=C3=BCnchen HRB 106955, Gesch=C3=A4ftsf=C3=BChrer: Thoma= s Heurung, Alexander Walter