PING -- [PATCH, fortran] PR 85982 -- ICE in resolve_component

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

PING -- [PATCH, fortran] PR 85982 -- ICE in resolve_component

gcc - fortran mailing list
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  <[hidden email]>

       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  <[hidden email]>

       PR fortran/85982
       * gfortran.dg/dec_structure_28.f90: New test.

pr85982.patch (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: PING -- [PATCH, fortran] PR 85982 -- ICE in resolve_component

gcc - fortran mailing list
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 <[hidden email]> wrote:

>
> In principle, I like the patch. However, I think one should
> replace
>
> gfc_error ("Attribute at %L is not allowed in a %s definition",
>            …, state_name
>
> by something like:
>
> bool is_type = gfc_current_state () == COMP_DERIVED;
> gfc_error (is_type ? G_("Attribute at %L is not allowed in a TYPE definition")
>                    : G_("Attribute at %L is not allowed in a STRUCTURE definition"),
>            …
>
> Reason: (a) This makes translation simpler; e.g. 'structure' and 'type' have
> 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 – 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 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  <[hidden email]>
> >
> >         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  <[hidden email]>
> >
> >         PR fortran/85982
> >         * gfortran.dg/dec_structure_28.f90: New test.
> -----------------
> Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany
> Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Alexander Walter