This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, Fortran, F03] PR 84385: Reject invalid SELECT TYPE selector (allocate_with_source_22.f03)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]