[Patch, Fortran] PR 57160: short-circuit IF only with -ffrontend-optimize

Thomas Koenig tkoenig@netcologne.de
Tue Jul 24 19:50:00 GMT 2018


Am 24.07.2018 um 20:46 schrieb Janus Weil:
> Good, since we all seem to agree on that, I'm including it in the
> patch (new version in the attachment).

Sorry for chiming in so late, but I don't (and Dominique doesn't
either).

If you want to enforce either short-circuit evaluation or
forced evaluation, please use a dedicated option.

I don't think it is a good idea to have

if (allocated(x) .and. any(x>0))

crash on -O0 and not crash on -O.

-O should not change the semantics of a program in
such a way.

Regards

	Thomas



More information about the Fortran mailing list