aboutsummaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
authorSteven G. Kargl <kargl@gcc.gnu.org>2018-12-21 21:09:17 +0000
committerSteven G. Kargl <kargl@gcc.gnu.org>2018-12-21 21:09:17 +0000
commit8ab8b08a1384e727f1e0efead5f052dfda703f35 (patch)
tree8cdea604544a9c90796000edc51b2434e4cc0a77 /libgfortran
parent4cd3e7df0b7dc202d10ed7935918f1194adfc514 (diff)
downloadgcc-8ab8b08a1384e727f1e0efead5f052dfda703f35.zip
gcc-8ab8b08a1384e727f1e0efead5f052dfda703f35.tar.gz
gcc-8ab8b08a1384e727f1e0efead5f052dfda703f35.tar.bz2
re PR fortran/69121 (IEEE_SCALB is not generic)
2018-12-21 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/69121 * ieee/ieee_arithmetic.F90: Provide missing interfaces for IEEE_SCALB. 2018-12-21 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/69121 * gfortran.dg/ieee/ieee_9.f90: New test. From-SVN: r267343
Diffstat (limited to 'libgfortran')
-rw-r--r--libgfortran/ChangeLog7
-rw-r--r--libgfortran/ieee/ieee_arithmetic.F90153
2 files changed, 149 insertions, 11 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 43e7140..03efb11 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,6 +1,11 @@
+2018-12-21 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/69121
+ * ieee/ieee_arithmetic.F90: Provide missing interfaces for IEEE_SCALB.
+
2018-12-20 Steven G. Kargl <kargl@gcc.gnu.org>
- * libgfortran/ieee/ieee_arithmetic.F90: Re-organize file to
+ * ieee/ieee_arithmetic.F90: Re-organize file to
eliminate #ifdef ... #endif. No functional change.
2018-12-09 Thomas Koenig <tkoenig@gcc.gnu.org>
diff --git a/libgfortran/ieee/ieee_arithmetic.F90 b/libgfortran/ieee/ieee_arithmetic.F90
index 3949646..0937560 100644
--- a/libgfortran/ieee/ieee_arithmetic.F90
+++ b/libgfortran/ieee/ieee_arithmetic.F90
@@ -532,37 +532,170 @@ REM_MACRO(4,4,4)
! IEEE_SCALB
interface
- elemental real(kind=4) function _gfortran_ieee_scalb_4 (X, I)
+#ifdef HAVE_GFC_INTEGER_16
+#ifdef HAVE_GFC_REAL_16
+ elemental real(kind=16) function _gfortran_ieee_scalb_16_16 (X, I)
+ real(kind=16), intent(in) :: X
+ integer(kind=16), intent(in) :: I
+ end function
+#endif
+#ifdef HAVE_GFC_REAL_10
+ elemental real(kind=10) function _gfortran_ieee_scalb_10_16 (X, I)
+ real(kind=10), intent(in) :: X
+ integer(kind=16), intent(in) :: I
+ end function
+#endif
+ elemental real(kind=8) function _gfortran_ieee_scalb_8_16 (X, I)
+ real(kind=8), intent(in) :: X
+ integer(kind=16), intent(in) :: I
+ end function
+ elemental real(kind=4) function _gfortran_ieee_scalb_4_16 (X, I)
real(kind=4), intent(in) :: X
- integer, intent(in) :: I
+ integer(kind=16), intent(in) :: I
end function
- elemental real(kind=8) function _gfortran_ieee_scalb_8 (X, I)
+#endif
+
+#ifdef HAVE_GFC_INTEGER_8
+#ifdef HAVE_GFC_REAL_16
+ elemental real(kind=16) function _gfortran_ieee_scalb_16_8 (X, I)
+ real(kind=16), intent(in) :: X
+ integer(kind=8), intent(in) :: I
+ end function
+#endif
+#ifdef HAVE_GFC_REAL_10
+ elemental real(kind=10) function _gfortran_ieee_scalb_10_8 (X, I)
+ real(kind=10), intent(in) :: X
+ integer(kind=8), intent(in) :: I
+ end function
+#endif
+ elemental real(kind=8) function _gfortran_ieee_scalb_8_8 (X, I)
real(kind=8), intent(in) :: X
- integer, intent(in) :: I
+ integer(kind=8), intent(in) :: I
+ end function
+ elemental real(kind=4) function _gfortran_ieee_scalb_4_8 (X, I)
+ real(kind=4), intent(in) :: X
+ integer(kind=8), intent(in) :: I
+ end function
+#endif
+
+#ifdef HAVE_GFC_INTEGER_2
+#ifdef HAVE_GFC_REAL_16
+ elemental real(kind=16) function _gfortran_ieee_scalb_16_2 (X, I)
+ real(kind=16), intent(in) :: X
+ integer(kind=2), intent(in) :: I
end function
+#endif
#ifdef HAVE_GFC_REAL_10
- elemental real(kind=10) function _gfortran_ieee_scalb_10 (X, I)
+ elemental real(kind=10) function _gfortran_ieee_scalb_10_2 (X, I)
real(kind=10), intent(in) :: X
- integer, intent(in) :: I
+ integer(kind=2), intent(in) :: I
+ end function
+#endif
+ elemental real(kind=8) function _gfortran_ieee_scalb_8_2 (X, I)
+ real(kind=8), intent(in) :: X
+ integer(kind=2), intent(in) :: I
+ end function
+ elemental real(kind=4) function _gfortran_ieee_scalb_4_2 (X, I)
+ real(kind=4), intent(in) :: X
+ integer(kind=2), intent(in) :: I
+ end function
+#endif
+
+#ifdef HAVE_GFC_INTEGER_1
+#ifdef HAVE_GFC_REAL_16
+ elemental real(kind=16) function _gfortran_ieee_scalb_16_1 (X, I)
+ real(kind=16), intent(in) :: X
+ integer(kind=1), intent(in) :: I
end function
#endif
+#ifdef HAVE_GFC_REAL_10
+ elemental real(kind=10) function _gfortran_ieee_scalb_10_1 (X, I)
+ real(kind=10), intent(in) :: X
+ integer(kind=1), intent(in) :: I
+ end function
+#endif
+ elemental real(kind=8) function _gfortran_ieee_scalb_8_1 (X, I)
+ real(kind=8), intent(in) :: X
+ integer(kind=1), intent(in) :: I
+ end function
+ elemental real(kind=4) function _gfortran_ieee_scalb_4_1 (X, I)
+ real(kind=4), intent(in) :: X
+ integer(kind=1), intent(in) :: I
+ end function
+#endif
+
#ifdef HAVE_GFC_REAL_16
- elemental real(kind=16) function _gfortran_ieee_scalb_16 (X, I)
+ elemental real(kind=16) function _gfortran_ieee_scalb_16_4 (X, I)
real(kind=16), intent(in) :: X
integer, intent(in) :: I
end function
#endif
+#ifdef HAVE_GFC_REAL_10
+ elemental real(kind=10) function _gfortran_ieee_scalb_10_4 (X, I)
+ real(kind=10), intent(in) :: X
+ integer, intent(in) :: I
+ end function
+#endif
+ elemental real(kind=8) function _gfortran_ieee_scalb_8_4 (X, I)
+ real(kind=8), intent(in) :: X
+ integer, intent(in) :: I
+ end function
+ elemental real(kind=4) function _gfortran_ieee_scalb_4_4 (X, I)
+ real(kind=4), intent(in) :: X
+ integer, intent(in) :: I
+ end function
end interface
interface IEEE_SCALB
procedure &
+#ifdef HAVE_GFC_INTEGER_16
+#ifdef HAVE_GFC_REAL_16
+ _gfortran_ieee_scalb_16_16, &
+#endif
+#ifdef HAVE_GFC_REAL_10
+ _gfortran_ieee_scalb_10_16, &
+#endif
+ _gfortran_ieee_scalb_8_16, &
+ _gfortran_ieee_scalb_4_16, &
+#endif
+#ifdef HAVE_GFC_INTEGER_8
+#ifdef HAVE_GFC_REAL_16
+ _gfortran_ieee_scalb_16_8, &
+#endif
+#ifdef HAVE_GFC_REAL_10
+ _gfortran_ieee_scalb_10_8, &
+#endif
+ _gfortran_ieee_scalb_8_8, &
+ _gfortran_ieee_scalb_4_8, &
+#endif
+#ifdef HAVE_GFC_INTEGER_2
+#ifdef HAVE_GFC_REAL_16
+ _gfortran_ieee_scalb_16_2, &
+#endif
+#ifdef HAVE_GFC_REAL_10
+ _gfortran_ieee_scalb_10_2, &
+#endif
+ _gfortran_ieee_scalb_8_2, &
+ _gfortran_ieee_scalb_4_2, &
+#endif
+#ifdef HAVE_GFC_INTEGER_1
+#ifdef HAVE_GFC_REAL_16
+ _gfortran_ieee_scalb_16_1, &
+#endif
+#ifdef HAVE_GFC_REAL_10
+ _gfortran_ieee_scalb_10_1, &
+#endif
+ _gfortran_ieee_scalb_8_1, &
+ _gfortran_ieee_scalb_4_1, &
+#endif
#ifdef HAVE_GFC_REAL_16
- _gfortran_ieee_scalb_16, &
+ _gfortran_ieee_scalb_16_4, &
#endif
#ifdef HAVE_GFC_REAL_10
- _gfortran_ieee_scalb_10, &
+ _gfortran_ieee_scalb_10_4, &
#endif
- _gfortran_ieee_scalb_8, _gfortran_ieee_scalb_4
+ _gfortran_ieee_scalb_8_4, &
+ _gfortran_ieee_scalb_4_4
end interface
public :: IEEE_SCALB