about summary refs log tree commit diff
path: root/sysdeps/s390/fpu
diff options
context:
space:
mode:
authorStefan Liebler <stli@linux.ibm.com>2019-11-06 08:07:40 +0100
committerStefan Liebler <stli@linux.ibm.com>2019-11-06 08:07:40 +0100
commit64bca76f42a82e6a9ea2b0166deab7aa2b7efbea (patch)
treefe6cd7161c0c2661033f8ce2b54e84e69c90f266 /sysdeps/s390/fpu
parentf2e30cc0f89f348a154c5c09d21a1de561c7b2f8 (diff)
downloadglibc-64bca76f42a82e6a9ea2b0166deab7aa2b7efbea.tar.gz
glibc-64bca76f42a82e6a9ea2b0166deab7aa2b7efbea.tar.xz
glibc-64bca76f42a82e6a9ea2b0166deab7aa2b7efbea.zip
S390: Fp comparison are now raising FE_INVALID with gcc 10.
The s390 gcc bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77918
"S390: Floating point comparisons don't raise invalid for unordered operands."
is fixed with gcc 10. Thus we conditionally set FIX_COMPARE_INVALID
to 0 or 1.
Diffstat (limited to 'sysdeps/s390/fpu')
-rw-r--r--sysdeps/s390/fpu/fix-fp-int-compare-invalid.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/sysdeps/s390/fpu/fix-fp-int-compare-invalid.h b/sysdeps/s390/fpu/fix-fp-int-compare-invalid.h
index dc2450cf83..440b3d0036 100644
--- a/sysdeps/s390/fpu/fix-fp-int-compare-invalid.h
+++ b/sysdeps/s390/fpu/fix-fp-int-compare-invalid.h
@@ -27,10 +27,12 @@
    <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77918>.
    There exists an equivalent gcc bugzilla for Intel:
    <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52451>.
-   Once the s390 gcc bug is fixed, the definition of FIX_COMPARE_INVALID
-   should have a __GNUC_PREREQ conditional added so that e.g. the workaround
-   to call feraiseexcept (FE_INVALID) in math/s_iseqsig_template.c can be
-   avoided.  */
-#define FIX_COMPARE_INVALID 1
+   This s390 gcc bug is fixed with gcc 10, thus we don't need the workaround
+   to call feraiseexcept (FE_INVALID) in math/s_iseqsig_template.c.  */
+#if __GNUC_PREREQ (10, 0)
+# define FIX_COMPARE_INVALID 0
+#else
+# define FIX_COMPARE_INVALID 1
+#endif
 
 #endif /* fix-fp-int-compare-invalid.h */