[Bug fortran/85599] Prevent short-circuiting of logical expressions for non-pure functions

2018-06-11 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85599 --- Comment #35 from Dominique d'Humieres --- > gfc_warning(OPT_Wsurprising, "Impure function %qs at %L may not be > evaluated", ...) I am perfectly happy with the short-circuit evaluation and I don't want any warning when I use -Wall.

[Bug fortran/85599] Prevent short-circuiting of logical expressions for non-pure functions

2018-06-10 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85599 Thomas Koenig changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned a

[Bug fortran/85599] Prevent short-circuiting of logical expressions for non-pure functions

2018-05-18 Thread sgk at troutmask dot apl.washington.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85599 --- Comment #33 from Steve Kargl --- On Fri, May 18, 2018 at 06:23:41PM +, janus at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85599 > > --- Comment #32 from janus at gcc dot gnu.org --- > (In reply to Steve Kargl

[Bug fortran/85599] Prevent short-circuiting of logical expressions for non-pure functions

2018-05-18 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85599 --- Comment #32 from janus at gcc dot gnu.org --- (In reply to Steve Kargl from comment #31) > > This PR is not about reordering, but about short-circuiting. > > AFAICT this PR is about a function with side-effects, > and re-ordering can have an

[Bug fortran/85599] Prevent short-circuiting of logical expressions for non-pure functions

2018-05-18 Thread sgk at troutmask dot apl.washington.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85599 --- Comment #31 from Steve Kargl --- On Thu, May 17, 2018 at 05:37:51AM +, janus at gcc dot gnu.org wrote: > > > The order of the evaluation of ping() and pong() is > > not specified by the Fortran standard. > > This PR is not about reorde

[Bug fortran/85599] Prevent short-circuiting of logical expressions for non-pure functions

2018-05-17 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85599 Dominique d'Humieres changed: What|Removed |Added CC||Joost.VandeVondele at mat dot eth

[Bug fortran/85599] Prevent short-circuiting of logical expressions for non-pure functions

2018-05-17 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85599 --- Comment #29 from janus at gcc dot gnu.org --- (In reply to Thomas Koenig from comment #27) > > If an impure function is found (recursively) in the operands of an .AND. > > expression, issue a > > > > gfc_warning(OPT_Wsurprising, "Impure funct

[Bug fortran/85599] Prevent short-circuiting of logical expressions for non-pure functions

2018-05-17 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85599 Dominique d'Humieres changed: What|Removed |Added Keywords|wrong-code | Priority|P3