[Patch, Fortran] PR 85599: warn about short-circuiting of logical expressions for non-pure functions

Janus Weil janus@gcc.gnu.org
Wed Jul 18 18:43:00 GMT 2018


I have now finally committed this as r262860. Thanks everyone for
helping to bring this to a constructive end (and especially to Thomas
for the useful input and for putting up with me).

Cheers,
Janus

PS: The next step here would be to tackle PR57160 and avoid the
short-circuiting with -O0 (I might actually look into that soon). Once
that is done we could even talk about further optimizations (as
previously suggested by Thomas), provided they are only done with
-O... flags and warned about with appropriate -W... flags.



2018-07-17 21:21 GMT+02:00 Janus Weil <janus@gcc.gnu.org>:
> 2018-07-17 20:55 GMT+02:00 Fritz Reese <fritzoreese@gmail.com>:
>> On Tue, Jul 17, 2018 at 2:36 PM Janus Weil <janus@gcc.gnu.org> wrote:
>>>
>>> 2018-07-17 19:34 GMT+02:00 Thomas Koenig <tkoenig@netcologne.de>:
>>> > Am 17.07.2018 um 19:19 schrieb Janus Weil:
>> [...]
>>>
>>> I do hope that things have converged by now and that this will be the
>>> last incarnation of the patch. If there is no more feedback in the
>>> next 24 hours, I'll commit this tomorrow.
>>
>> I hate to be pedantic but it is still worth fixing the style discrepancies:
>
> Oh, sure. Such things are non-optional in GCC, I was just a bit sloppy
> with this. Thanks for catching! Should be fixed in the attached
> update.
>
>
>> My only other comment is I am not sure why you make
>> pure_function()/gfc_implicit_pure_function() public... but I have no
>> real problem with it. Just means rebuilding all of f951 instead of one
>> object. :-(
>
> Well, originally they were only used in resolve.c, but now I need them
> also in frontend-passes.c, therefore they have to be public.
>
>
>> Otherwise if the patch does what it appears to do and passes tests
>> then it seems fine to me.
>
> Thanks for the review!
>
> Cheers,
> Janus



More information about the Gcc-patches mailing list