[Bug fortran/85599] invalid optimization: function not always evaluated in logical expression

janus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed May 2 12:03:00 GMT 2018


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

--- Comment #7 from janus at gcc dot gnu.org ---
(In reply to janus from comment #4)
> What worries me most is that other compilers choose different
> implementations. Can this kind of code really be processor-dependent?

Most other compilers that I tried actually behave different than gfortran,
calling 'check' twice in the test case of comment #0 (ifort, flang, PGI).

The only compiler that behaves like gfortran and optimizes the second call out
is the Oracle compiler (sunf95).

All gfortran versions since at least 4.4 behave in the same way.


More information about the Gcc-bugs mailing list