This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, Fortran, F03] PR 84385: Reject invalid SELECT TYPE selector (allocate_with_source_22.f03)
- From: Janus Weil <janus at gcc dot gnu dot org>
- To: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- Cc: gfortran <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 14 Feb 2018 22:48:46 +0100
- Subject: Re: [Patch, Fortran, F03] PR 84385: Reject invalid SELECT TYPE selector (allocate_with_source_22.f03)
- Authentication-results: sourceware.org; auth=none
- References: <CAKwh3qiE4wvjZmmT_F4Czf66UvSLkLbRHKM7Zr_bj5YJzZigwQ@mail.gmail.com> <20180214211651.GA20240@troutmask.apl.washington.edu> <CAKwh3qhBO+6U=kDe1uc2-XyYQ1KSgs4w2Ksm4RwiZUh3+piGvg@mail.gmail.com>
2018-02-14 22:30 GMT+01:00 Janus Weil <janus@gcc.gnu.org>:
> 2018-02-14 22:16 GMT+01:00 Steve Kargl <sgk@troutmask.apl.washington.edu>:
>> On Wed, Feb 14, 2018 at 10:10:09PM +0100, Janus Weil wrote:
>>>
>>> Regtests cleanly on x86_64-linux-gnu. Ok for trunk?
>>>
>>
>> Looks okay to me with two question below.
>>
>>> Index: gcc/fortran/match.c
>>> ===================================================================
>>> --- gcc/fortran/match.c (revision 257635)
>>> +++ gcc/fortran/match.c (working copy)
>>> @@ -6201,9 +6201,10 @@ gfc_match_select_type (void)
>>> || CLASS_DATA (expr1)->attr.codimension)
>>> && expr1->ref
>>> && expr1->ref->type == REF_ARRAY
>>> + && expr1->ref->u.ar.type == AR_FULL
>>> && expr1->ref->next == NULL);
>>>
>>> - /* Check for F03:C811. */
>>> + /* Check for F03:C811 (F08:C835). */
>>
>> Is there a testcase that causes gfortran to emit
>> an error message for violation of F03:C811? If no,
>> could you commit one?
>
> Good point: Yes, there is such a test case, but it does not cover the
> case that is fixed with the patch. I have now added this case to
> select_type_1.f03, see updated patch in attachment.
I have just committed this updated patch as r257673. Thanks for the
review, Steve.
Cheers,
Janus