[flang] - ieee_exceptions.f90: I added all of the routines listed in table 17.3 of the standard that were not currently specified. I also re-ordered the routines to be in the same order as the standard.

- doconcurrent01.f90: I removed the custom versions of ieee_exceptions and
 iso_fortran_env.  I also fixed a typo in a comment.  Also, the use of the real
 standare interface caused one of the error messages to go away, so I fixed
 that.

Original-commit: flang-compiler/f18@a8b310a968
Reviewed-on: https://github.com/flang-compiler/f18/pull/637
This commit is contained in:
Peter Steinfeld 2019-08-09 11:34:31 -07:00
parent 5bade83a0b
commit 8768a11d4c
2 changed files with 33 additions and 28 deletions

View File

@ -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

View File

@ -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