[flang] Change names of specific procedures of generic interfaces in intrinsic modules

Intrinsic procedures in intrinsic modules that have (or better, *are*) generic interfaces
must not have specific procedures with the same name according to the Fortran
standard (17.11.1); i.e., a user program is allowed to define a procedure
of the same name as one of these generic interfaces, even when the generic is
in scope.

Differential Revision: https://reviews.llvm.org/D131108
This commit is contained in:
Peter Klausler 2022-08-03 12:32:15 -07:00
parent bad5205595
commit f329cf97f2
3 changed files with 27 additions and 27 deletions

View File

@ -54,33 +54,33 @@ module __Fortran_ieee_exceptions
G##_a2, G##_a3, G##_a4, G##_a8, G##_a10, G##_a16
interface ieee_get_flag
elemental subroutine ieee_get_flag(flag, flag_value)
elemental subroutine ieee_get_flag_0(flag, flag_value)
import ieee_flag_type
type(ieee_flag_type), intent(in) :: flag
logical, intent(out) :: flag_value
end subroutine ieee_get_flag
end subroutine ieee_get_flag_0
end interface
interface ieee_get_halting_mode
elemental subroutine ieee_get_halting_mode(flag, halting)
elemental subroutine ieee_get_halting_mode_0(flag, halting)
import ieee_flag_type
type(ieee_flag_type), intent(in) :: flag
logical, intent(out) :: halting
end subroutine ieee_get_halting_mode
end subroutine ieee_get_halting_mode_0
end interface
interface ieee_get_modes
subroutine ieee_get_modes(modes)
subroutine ieee_get_modes_0(modes)
import ieee_modes_type
type(ieee_modes_type), intent(out) :: modes
end subroutine ieee_get_modes
end subroutine ieee_get_modes_0
end interface
interface ieee_get_status
subroutine ieee_get_status(status)
subroutine ieee_get_status_0(status)
import ieee_status_type
type(ieee_status_type), intent(out) :: status
end subroutine ieee_get_status
end subroutine ieee_get_status_0
end interface
#define IEEE_SET_FLAG_L(FVKIND) \
@ -110,17 +110,17 @@ module __Fortran_ieee_exceptions
#undef IEEE_SET_HALTING_MODE_L
interface ieee_set_modes
subroutine ieee_set_modes(modes)
subroutine ieee_set_modes_0(modes)
import ieee_modes_type
type(ieee_modes_type), intent(in) :: modes
end subroutine ieee_set_modes
end subroutine ieee_set_modes_0
end interface
interface ieee_set_status
subroutine ieee_set_status(status)
subroutine ieee_set_status_0(status)
import ieee_status_type
type(ieee_status_type), intent(in) :: status
end subroutine ieee_set_status
end subroutine ieee_set_status_0
end interface
#define IEEE_SUPPORT_FLAG_R(XKIND) \
@ -130,20 +130,20 @@ module __Fortran_ieee_exceptions
real(XKIND), intent(in) :: x(..); \
end function ieee_support_flag_a##XKIND;
interface ieee_support_flag
pure logical function ieee_support_flag(flag)
pure logical function ieee_support_flag_0(flag)
import ieee_flag_type
type(ieee_flag_type), intent(in) :: flag
end function ieee_support_flag
end function ieee_support_flag_0
SPECIFICS_R(IEEE_SUPPORT_FLAG_R)
end interface ieee_support_flag
PRIVATE_R(IEEE_SUPPORT_FLAG)
#undef IEEE_SUPPORT_FLAG_R
interface ieee_support_halting
pure logical function ieee_support_halting(flag)
pure logical function ieee_support_halting_0(flag)
import ieee_flag_type
type(ieee_flag_type), intent(in) :: flag
end function ieee_support_halting
end function ieee_support_halting_0
end interface
end module __Fortran_ieee_exceptions

View File

@ -190,10 +190,10 @@ module ieee_arithmetic
integer(RKIND), intent(in) :: radix; \
end subroutine ieee_get_rounding_mode_i##RKIND;
interface ieee_get_rounding_mode
subroutine ieee_get_rounding_mode(round_value)
subroutine ieee_get_rounding_mode_0(round_value)
import ieee_round_type
type(ieee_round_type), intent(out) :: round_value
end subroutine ieee_get_rounding_mode
end subroutine ieee_get_rounding_mode_0
SPECIFICS_I(IEEE_GET_ROUNDING_MODE_I)
end interface ieee_get_rounding_mode
PRIVATE_I(IEEE_GET_ROUNDING_MODE)
@ -418,10 +418,10 @@ module ieee_arithmetic
integer(RKIND), intent(in) :: radix; \
end subroutine ieee_set_rounding_mode_i##RKIND;
interface ieee_set_rounding_mode
subroutine ieee_set_rounding_mode(round_value)
subroutine ieee_set_rounding_mode_0(round_value)
import ieee_round_type
type(ieee_round_type), intent(in) :: round_value
end subroutine ieee_set_rounding_mode
end subroutine ieee_set_rounding_mode_0
SPECIFICS_I(IEEE_SET_ROUNDING_MODE_I)
end interface ieee_set_rounding_mode
PRIVATE_I(IEEE_SET_ROUNDING_MODE)
@ -514,10 +514,10 @@ module ieee_arithmetic
real(XKIND), intent(in) :: x(..); \
end function ieee_support_rounding_a##XKIND;
interface ieee_support_rounding
pure logical function ieee_support_rounding(round_value)
pure logical function ieee_support_rounding_0(round_value)
import ieee_round_type
type(ieee_round_type), intent(in) :: round_value
end function ieee_support_rounding
end function ieee_support_rounding_0
SPECIFICS_R(IEEE_SUPPORT_ROUNDING_R)
end interface ieee_support_rounding
PRIVATE_R(IEEE_SUPPORT_ROUNDING)

View File

@ -147,13 +147,13 @@ module iso_fortran_env
integer, parameter :: stat_unlocked_failed_image = FORTRAN_RUNTIME_STAT_UNLOCKED_FAILED_IMAGE
interface compiler_options
character(len=80) function compiler_options()
end function compiler_options
character(len=80) function compiler_options_1()
end function compiler_options_1
end interface compiler_options
interface compiler_version
character(len=80) function compiler_version()
end function compiler_version
character(len=80) function compiler_version_1()
end function compiler_version_1
end interface compiler_version
end module iso_fortran_env