[flang-commits] [flang] f329cf9 - [flang] Change names of specific procedures of generic interfaces in intrinsic modules
Peter Klausler via flang-commits
flang-commits at lists.llvm.org
Tue Aug 9 08:58:31 PDT 2022
Author: Peter Klausler
Date: 2022-08-09T08:51:59-07:00
New Revision: f329cf97f25e7c3a3bc735c226605deac806bd5e
URL: https://github.com/llvm/llvm-project/commit/f329cf97f25e7c3a3bc735c226605deac806bd5e
DIFF: https://github.com/llvm/llvm-project/commit/f329cf97f25e7c3a3bc735c226605deac806bd5e.diff
LOG: [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
Added:
Modified:
flang/module/__fortran_ieee_exceptions.f90
flang/module/ieee_arithmetic.f90
flang/module/iso_fortran_env.f90
Removed:
################################################################################
diff --git a/flang/module/__fortran_ieee_exceptions.f90 b/flang/module/__fortran_ieee_exceptions.f90
index baba31c2ea3d1..36213debde6d0 100644
--- a/flang/module/__fortran_ieee_exceptions.f90
+++ b/flang/module/__fortran_ieee_exceptions.f90
@@ -54,33 +54,33 @@
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 @@ end subroutine ieee_set_halting_mode_l##HKIND;
#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 @@ pure logical function ieee_support_flag_a##XKIND(flag, x); \
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
diff --git a/flang/module/ieee_arithmetic.f90 b/flang/module/ieee_arithmetic.f90
index 365f803aca71e..00f25f6a437aa 100644
--- a/flang/module/ieee_arithmetic.f90
+++ b/flang/module/ieee_arithmetic.f90
@@ -190,10 +190,10 @@ subroutine ieee_get_rounding_mode_i##RKIND(round_value, radix); \
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 @@ subroutine ieee_set_rounding_mode_i##RKIND(round_value, radix); \
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 @@ pure logical function ieee_support_rounding_a##XKIND(round_value, x); \
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)
diff --git a/flang/module/iso_fortran_env.f90 b/flang/module/iso_fortran_env.f90
index 4109d26e50236..6ac9a501b199e 100644
--- a/flang/module/iso_fortran_env.f90
+++ b/flang/module/iso_fortran_env.f90
@@ -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
More information about the flang-commits
mailing list