https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85599
--- Comment #17 from Steve Kargl <sgk at troutmask dot apl.washington.edu> --- On Wed, May 16, 2018 at 08:41:42AM +0000, janus at gcc dot gnu.org wrote: > > > and implement it to transform > > result = op1 binop op2 > > > > into > > > > tmp1 = op1 > > tmp2 = op2 > > result = tmp1 BINOP tmp2 > > That's not what I had in mind. I'd rather make a change from > > result = op1 && op2 > > to > > result = op1 & op1 > 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.). What about real x, ping, pong external ping, pong x = ping() + pong() where both ping() and pong() have competing side effects. The order of the evaluation of ping() and pong() is not specified by the Fortran standard.