aboutsummaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
authorSteve Kargl <sgk@troutmask.apl.washington.edu>2021-02-12 07:58:16 -0800
committerJerry DeLisle <jvdelisle@gcc.gnu.org>2021-02-12 07:58:16 -0800
commit0631e008adc759cc801d0d034224ee6b4bcf31aa (patch)
treec96b1b4067b287dd13c516319c7f38e1b55e5508 /libgfortran
parentadfee3c4c03dd70a06f6283178d7943b09652206 (diff)
downloadgcc-0631e008adc759cc801d0d034224ee6b4bcf31aa.zip
gcc-0631e008adc759cc801d0d034224ee6b4bcf31aa.tar.gz
gcc-0631e008adc759cc801d0d034224ee6b4bcf31aa.tar.bz2
libgfortran: Fix PR95647 by changing the interfaces of operators .eq. and .ne.
The FE converts the old school .eq. to ==, and then tracks the ==. The module starts with == and so it does not properly overload the .eq. Reversing the interfaces fixes this. 2021-02-12 Steve Kargl <sgk@troutmask.apl.washington.edu> libgfortran/ChangeLog: PR libfortran/95647 * ieee/ieee_arithmetic.F90: Flip interfaces of operators .eq. to == and .ne. to /= . gcc/testsuite/ChangeLog: PR libfortran/95647 * gfortran.dg/ieee/ieee_12.f90: New test.
Diffstat (limited to 'libgfortran')
-rw-r--r--libgfortran/ieee/ieee_arithmetic.F909
1 files changed, 5 insertions, 4 deletions
diff --git a/libgfortran/ieee/ieee_arithmetic.F90 b/libgfortran/ieee/ieee_arithmetic.F90
index 5599223..35a1693 100644
--- a/libgfortran/ieee/ieee_arithmetic.F90
+++ b/libgfortran/ieee/ieee_arithmetic.F90
@@ -77,15 +77,16 @@ module IEEE_ARITHMETIC
! Equality operators on the derived types
- interface operator (==)
+ ! Note, the FE overloads .eq. to == and .ne. to /=
+ interface operator (.eq.)
module procedure IEEE_CLASS_TYPE_EQ, IEEE_ROUND_TYPE_EQ
end interface
- public :: operator(==)
+ public :: operator(.eq.)
- interface operator (/=)
+ interface operator (.ne.)
module procedure IEEE_CLASS_TYPE_NE, IEEE_ROUND_TYPE_NE
end interface
- public :: operator (/=)
+ public :: operator (.ne.)
! IEEE_IS_FINITE