[Bug fortran/91963] Logical function does not simplify
tkoenig at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Oct 2 09:27:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91963
--- Comment #2 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #1)
> But is it valid fortran?
I had to check, but yes.
LOGICAL is an elemental type conversion function, which has only constant
arguments, so it should be simplified.
There are also simpler cases where this works as expected:
program main
logical, parameter :: l1 = .true.
logical, parameter :: l4 = logical(l1, 4)
end program main
As does this:
program main
integer, parameter, dimension(1) :: ar = [4]
logical, parameter :: l1 = .true.
logical, parameter :: l4 = logical(l1, ar(1))
end program main
More information about the Gcc-bugs
mailing list