summaryrefslogtreecommitdiff
path: root/flang/module
diff options
context:
space:
mode:
authorV Donaldson <vdonaldson@nvidia.com>2022-06-13 15:16:07 -0700
committerV Donaldson <vdonaldson@nvidia.com>2022-06-13 16:36:07 -0700
commitd4980803b63cddd041bb8798cd3ca61fc8b4e3fd (patch)
tree1636ff244328d39ff5cc1f64122c35b8c03fac91 /flang/module
parent850097d6dca6eec41e74f8823949f626735d00fe (diff)
downloadllvm-d4980803b63cddd041bb8798cd3ca61fc8b4e3fd.tar.gz
[flang] Intrinsic module procedure pure prefixes
Per 7.11.1p1 - All [ieee_arithmetic and ieee_exceptions] functions are pure and all the subroutines are impure unless otherwise stated. Most of these functions are elemental (and not impure), which implies pure. Several of the remaining non-elemental functions are missing pure prefixes; add them.
Diffstat (limited to 'flang/module')
-rw-r--r--flang/module/__fortran_ieee_exceptions.f904
-rw-r--r--flang/module/ieee_arithmetic.f902
2 files changed, 3 insertions, 3 deletions
diff --git a/flang/module/__fortran_ieee_exceptions.f90 b/flang/module/__fortran_ieee_exceptions.f90
index 7232bbf53cd6..0b620f55cee8 100644
--- a/flang/module/__fortran_ieee_exceptions.f90
+++ b/flang/module/__fortran_ieee_exceptions.f90
@@ -124,13 +124,13 @@ module __Fortran_ieee_exceptions
end interface
#define IEEE_SUPPORT_FLAG_R(XKIND) \
- logical function ieee_support_flag_a##XKIND(flag, x); \
+ pure logical function ieee_support_flag_a##XKIND(flag, x); \
import ieee_flag_type; \
type(ieee_flag_type), intent(in) :: flag; \
real(XKIND), intent(in) :: x(..); \
end function ieee_support_flag_a##XKIND;
interface ieee_support_flag
- logical function ieee_support_flag(flag)
+ pure logical function ieee_support_flag(flag)
import ieee_flag_type
type(ieee_flag_type), intent(in) :: flag
end function ieee_support_flag
diff --git a/flang/module/ieee_arithmetic.f90 b/flang/module/ieee_arithmetic.f90
index b2ac217aa86a..365f803aca71 100644
--- a/flang/module/ieee_arithmetic.f90
+++ b/flang/module/ieee_arithmetic.f90
@@ -514,7 +514,7 @@ module ieee_arithmetic
real(XKIND), intent(in) :: x(..); \
end function ieee_support_rounding_a##XKIND;
interface ieee_support_rounding
- logical function ieee_support_rounding(round_value)
+ pure logical function ieee_support_rounding(round_value)
import ieee_round_type
type(ieee_round_type), intent(in) :: round_value
end function ieee_support_rounding