diff --git a/flang/module/ieee_exceptions.f90 b/flang/module/ieee_exceptions.f90 index a9f16e6202c0..6054a4775d04 100644 --- a/flang/module/ieee_exceptions.f90 +++ b/flang/module/ieee_exceptions.f90 @@ -42,22 +42,49 @@ module ieee_exceptions end type ieee_status_type contains + subroutine ieee_get_flag(flag, flag_value) + type(ieee_flag_type), intent(in) :: flag + logical, intent(out) :: flag_value + end subroutine ieee_get_flag + + subroutine ieee_get_halting_mode(flag, halting) + type(ieee_flag_type), intent(in) :: flag + logical, intent(out) :: halting + end subroutine ieee_get_halting_mode + subroutine ieee_get_modes(modes) type(ieee_modes_type), intent(out) :: modes end subroutine ieee_get_modes - subroutine ieee_set_modes(modes) - type(ieee_modes_type), intent(in) :: modes - end subroutine ieee_set_modes - subroutine ieee_get_status(status) type(ieee_status_type), intent(out) :: status end subroutine ieee_get_status + pure subroutine ieee_set_flag(flag, flag_value) + type(ieee_flag_type), intent(in) :: flag + logical, intent(in) :: flag_value + end subroutine ieee_set_flag + + pure subroutine ieee_set_halting_mode(flag, halting) + type(ieee_flag_type), intent(in) :: flag + logical, intent(in) :: halting + end subroutine ieee_set_halting_mode + + subroutine ieee_set_modes(modes) + type(ieee_modes_type), intent(in) :: modes + end subroutine ieee_set_modes + subroutine ieee_set_status(status) type(ieee_status_type), intent(in) :: status end subroutine ieee_set_status - ! TODO: other interfaces (see Table 17.3) + subroutine ieee_support_flag(flag, x) + type(ieee_flag_type), intent(in) :: flag + real, intent(in), optional :: x + end subroutine ieee_support_flag + + subroutine ieee_support_halting(flag) + type(ieee_flag_type), intent(in) :: flag + end subroutine ieee_support_halting end module ieee_exceptions diff --git a/flang/test/semantics/doconcurrent01.f90 b/flang/test/semantics/doconcurrent01.f90 index 4d76251929dd..d286bf5124a2 100644 --- a/flang/test/semantics/doconcurrent01.f90 +++ b/flang/test/semantics/doconcurrent01.f90 @@ -14,7 +14,7 @@ ! ! C1141 ! A reference to the procedure IEEE_GET_FLAG, IEEE_SET_HALTING_MODE, or -! IEEE_GET_- HALTING_MODE from the intrinsic module IEEE_EXCEPTIONS, shall not +! IEEE_GET_HALTING_MODE from the intrinsic module IEEE_EXCEPTIONS, shall not ! appear within a DO CONCURRENT construct. ! ! C1137 @@ -26,27 +26,6 @@ ! (11.1.7.5), paragraph 4 ! In a DO CONCURRENT, can't have an i/o statement with an ADVANCE= specifier -module ieee_exceptions - interface - subroutine ieee_get_flag(i, j) - integer :: i, j - end subroutine ieee_get_flag - subroutine ieee_get_halting_mode(i, j) - integer :: i - logical :: j - end subroutine ieee_get_halting_mode - subroutine ieee_set_halting_mode(i, j) - integer :: i - logical :: j - end subroutine ieee_set_halting_mode - end interface -end module ieee_exceptions - -module iso_fortran_env - type :: team_type - end type -end - subroutine do_concurrent_test1(i,n) implicit none integer :: i, n @@ -75,7 +54,6 @@ subroutine do_concurrent_test2(i,j,n,flag) !ERROR: call to impure subroutine in DO CONCURRENT not allowed !ERROR: IEEE_GET_HALTING_MODE not allowed in DO CONCURRENT call ieee_get_halting_mode(flag, halting) -!ERROR: call to impure subroutine in DO CONCURRENT not allowed !ERROR: IEEE_SET_HALTING_MODE not allowed in DO CONCURRENT call ieee_set_halting_mode(flag, halting) !ERROR: image control statement not allowed in DO CONCURRENT