This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, Fortran, Regression] PR 60231: ICE on undefined generic
- From: Janus Weil <janus at gcc dot gnu dot org>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: gfortran <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 18 Feb 2014 08:46:21 +0100
- Subject: Re: [Patch, Fortran, Regression] PR 60231: ICE on undefined generic
- Authentication-results: sourceware.org; auth=none
- References: <CAKwh3qi268Z1HC142FXML1vMk61Cy64p85C4gOSZijBr5txYiQ at mail dot gmail dot com> <530272E7 dot 6090303 at net-b dot de> <CAKwh3qiut5QvFPYfp0g0MhC2C1y5B0+LaAPUGnZi9-qmyUztcA at mail dot gmail dot com> <53030406 dot 9010507 at net-b dot de>
2014-02-18 7:56 GMT+01:00 Tobias Burnus <burnus@net-b.de>:
>
> Am 17.02.2014 21:51, schrieb Janus Weil:
>
>> 2014-02-17 21:36 GMT+01:00 Tobias Burnus <burnus@net-b.de>:
>>>
>>> Janus Weil wrote:
>>>>
>>>> attached is a patch for an ICE-on-invalid problem with generics: We
>>>> simply don't check if any dummy args are present.
>>>
>>> There is something odd with your test case - and possibly with the patch.
>>> You state that this is an ICE-on-invalid problem; however, I do not see a
>>> dg-error in your test case.
>>
>> Oh yes, sorry. I simply forgot the dg-errors. Thanks for noticing.
>> Updated test cases attached.
>
>
> That way, it makes more sense. I have now also looked at your patch and it
> is OK. Thanks!
Thanks for the review. Committed to trunk as r207836. Will do 4.8 soon.
Cheers,
Janus
>> The errors one gets with the patch (as with 4.7) are the following:
>>
>>
>> typebound_generic_15.f90:13.21:
>>
>> generic :: Add => Add1, Add2 ! { dg-error "are ambiguous" }
>> 1
>> Error: 'add1' and 'add2' for GENERIC 'add' at (1) are ambiguous
>> typebound_generic_15.f90:11.13:
>>
>> procedure :: Add1 ! { dg-error "must be a module
>> procedure" }
>> 1
>> Error: 'add1' must be a module procedure or an external procedure with
>> an explicit interface at (1)
>> typebound_generic_15.f90:12.13:
>>
>> procedure :: Add2 ! { dg-error "must be a module
>> procedure" }
>> 1
>> Error: 'add2' must be a module procedure or an external procedure with
>> an explicit interface at (1)
>>
>>
>> You think there's also something wrong with the patch?
>>
>> Cheers,
>> Janus
>>
>>
>>
>>>> Regtested on x86_64-unknown-linux-gnu. Ok for trunk and 4.8?
>>>>
>>>> Cheers,
>>>> Janus
>>>>
>>>>
>>>> 2014-02-17 Janus Weil <janus@gcc.gnu.org>
>>>>
>>>> PR fortran/60231
>>>> * resolve.c (check_generic_tbp_ambiguity): Check for presence of
>>>> dummy
>>>> arguments to prevent ICE.
>>>>
>>>>
>>>> 2014-02-17 Janus Weil <janus@gcc.gnu.org>
>>>>
>>>> PR fortran/60231
>>>> * gfortran.dg/typebound_generic_15.f90: New.
>>>
>>>
>