This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, fortran] PR40054 and PR63921 - Implement pointer function assignment - redux
- From: Paul Richard Thomas <paul dot richard dot thomas at gmail dot com>
- To: Mikael Morin <mikael dot morin at sfr dot fr>
- Cc: Dominique Dhumieres <dominiq at lps dot ens dot fr>, "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 28 Sep 2015 23:20:11 +0200
- Subject: Re: [Patch, fortran] PR40054 and PR63921 - Implement pointer function assignment - redux
- Authentication-results: sourceware.org; auth=none
- References: <CAGkQGiJfbXj7R+ZyRP5HYady5AGT4J3DzZ5hB1Ef3okEDeOO0A at mail dot gmail dot com> <CAGkQGiK181fCtrJH3Y=K4+N6bB7RFVuuD4zy-nW6AKz44se93Q at mail dot gmail dot com> <55FAC37D dot 6020205 at sfr dot fr> <CAGkQGi+sU_2yJzA01HiH1rKw1jRjvb3S5B=Wh2vOr1Cd7AdYmw at mail dot gmail dot com> <CAGkQGiLQuP_y3phLN1SbmAYkVy0G_hAWFHatWc0T51Uh9k9-XQ at mail dot gmail dot com> <56059F0C dot 3080906 at sfr dot fr> <CAGkQGi+SWNxxNSDW+4NzcL+AkfuPtEJKaEgEuS_Gdo7JuZNF4g at mail dot gmail dot com>
Committed as revision 228222. Thanks for all the help.
I'll update the fortran documentation tomorrow.
Cheers
Paul
On 28 September 2015 at 20:22, Paul Richard Thomas
<paul.richard.thomas@gmail.com> wrote:
> Dear Mikael,
>
> ....snip...
>
>>> * io.c (next_char_not_space): Change tab warning to warning now
>>> to prevent locus being lost.
>>
>> This has disappeared?
>
> duuh! Thanks
>
>
> ....snip....
>
>> I think that for better error reporting (avoid unclassifiable statement),
>> the gfc_notification_std can be dropped, as there is a specific
>> gfc_notify_std guarding resolution.
>
> That's true - I'll check it out right now.
>
>>
>> Same for the rest of the condition. gfc_match_ptr_fcn_assign carrefully
>> restores existing errors upon failure, so I would rather use it more often.
>>
>> So, can you try removing the condition completely (and use the match macro
>> above again)? that should improve errors in ptr_func_assign_2, and
>> hopefully not regress.
>> If it does regress, let's keep it as is.
>
> It does regress - that's why it is the way it is. Fortunately,
> MATCH_ERROR for statement functions would produce pretty much the same
> result in pointer function assignments. The regression is in
> recursive_statement_functions.f90, which just gets hopelessly tangled
> up in error recovery.
>
> ....snip....
>
>> Nit: Usually, we don't put the 'F2008:' prefix.
>> Also may be explicit a bit more: "function result as assigned-to variable"
>> or something alike.
>
> Nits or not, they are good points :-)
>
>>
>> Anyway, those are nits, and the rest looks good to me.
>> So, with the above comments, the patch is OK as far as I'm concerned.
>> Thanks
>
> OK - I'll try to do the honours tonight.
>
> Thanks for the reviews.
>
> Paul
--
Outside of a dog, a book is a man's best friend. Inside of a dog it's
too dark to read.
Groucho Marx