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

            Bug ID: 89240
           Summary: Discrepancy in the return kind of MAX and MIN between
                    all literal input parameters and input parameters that
                    are variables
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mark.eggleston at codethink dot com
  Target Milestone: ---

Return kind differs when actual arguments are all literals and when they have
at least one variable.

integer(2) :: a2
integer(4) :: a4
write(*,*) kind(max(7, 9_1))
write(*,*) kind(max(7_2, 9))
write(*,*) kind(max(a2, a4))
write(*,*) kind(min(7_2, 9))
write(*,*) kind(min(a2, a4))
end

gives

           4
           2
           4
           2
           4

So there is discrepancy between literal arguments and variables for MAX and
MIN.

Reply via email to