URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [min_max_optional_5.f90] - Rev 302
Compare with Previous | Blame | View Log
! More tests for MIN/MAX with optional arguments
! PR33095
!
! { dg-do run }
if (m1(3,4) /= 4) call abort
if (m1(3) /= 3) call abort
if (m1() /= 2) call abort
if (m1(3,4) /= 4) call abort
if (m1(3) /= 3) call abort
contains
integer function m1(a1,a2)
integer, optional, intent(in) :: a1, a2
m1 = max(1, 2, a1, a2)
end function m1
integer function m2(a1,a2)
integer, optional, intent(in) :: a1, a2
m2 = max(1, a1, 2, a2)
end function m2
end