[Bug fortran/85599] invalid optimization: function not always evaluated in logical expression
dominiq at lps dot ens.fr
gcc-bugzilla@gcc.gnu.org
Sun May 6 13:13:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85599
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |WAITING
--- Comment #12 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
IMO the interpretation of 7.1.4 (10.1.4 in my F2018 draft) in comment 4
contradicts the note 7.28 (10.28) which explicitly states that L(Z) need not be
evaluated if X is greater than Y, i.e., check() here.
Evaluating
A = B .and. C
where A is a logical variable and B and C are logical variables, expressions,
..., as
if (B) then
A = C
else
A = .false.
end if
is not even an optimization.
I think this PR should be closed either as INVALID or a duplicate of pr57160.
More information about the Gcc-bugs
mailing list