https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85599

--- Comment #19 from janus at gcc dot gnu.org ---
(In reply to Steve Kargl from comment #17)
> Then you are only interest in the special case of .and.
> 
> binop above is the entire collection of all binary
> operators (e.g., +,-,*,/ etc as well as .and.).

The original problem of ill-posed short-circuiting does not apply to all binary
operators, but only to things like:

* X = .false. .and. Y()
* X = .true. .or. Y()

and possibly:

* X = 0 * Y()
* X = 0 / Y()

(in case gfortran applies 'short-circuiting' for such cases, which I haven't
checked).

There might be other cases as well, but it certainly does not apply to + and -.


> The order of the evaluation of ping() and pong() is 
> not specified by the Fortran standard.

This PR is not about reordering, but about short-circuiting.

Reply via email to