This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, Fortran, OOP] PR 59143: Bogus warning with array-valued type-bound procedure
- 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: Mon, 25 Nov 2013 10:49:23 +0100
- Subject: Re: [Patch, Fortran, OOP] PR 59143: Bogus warning with array-valued type-bound procedure
- Authentication-results: sourceware.org; auth=none
- References: <CAKwh3qiyeTOTTYgLAnkVP=qnvSRdVFgNQ8mXtwd9umyrNHLY6Q at mail dot gmail dot com> <52921CD9 dot 8060509 at net-b dot de> <CAKwh3qhS4_imnBADLvucMKFM-8kVuSCDuivovuFJc3a+tvybXg at mail dot gmail dot com> <52927F69 dot 2080204 at net-b dot de>
Hi,
>>> + else if (ref->type == REF_COMPONENT &&
>>> ref->u.c.component->attr.function
>>> + && ref->u.c.component->attr.proc_pointer
>>> + && ref->u.c.component->attr.dimension)
>
>
> I wonder whether one should take care of functions returning BT_CLASS, but I
> think one doesn't need to.
yes, I think no special treatment for class results is necessary. They
cannot have fixed array bounds anyway. I tried some simple example
which were handled properly by the current patch.
>>> You cannot assume that the function returns an explicit size array with
>>> constant bounds.
>>
>> A new version is attached, and I have added one of your examples to
>>
>> the test case. Ok now?
>
>
> OK. Thanks for the patch!
Thanks for the review. Committed as r205345.
Cheers,
Janus