]> Savannah Git Hosting - gnulib.git/commitdiff
Fix a test failure from a clang that masquerades as gcc 13.
authorBruno Haible <bruno@clisp.org>
Mon, 26 Aug 2024 22:49:07 +0000 (00:49 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 26 Aug 2024 22:49:07 +0000 (00:49 +0200)
* tests/test-fenv-except-trapping-2.c (main): Skip the '4' test on
clang, since clang 17 still generates buggy comparisons, like gcc
versions < 8.

ChangeLog
tests/test-fenv-except-trapping-2.c

index 0dadf61ea0b3b317ae6665fc94837fac35f470ef..c9bccf683960190718d628adb0224e444b6725f3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-08-26  Bruno Haible  <bruno@clisp.org>
+
+       Fix a test failure from a clang that masquerades as gcc 13.
+       * tests/test-fenv-except-trapping-2.c (main): Skip the '4' test on
+       clang, since clang 17 still generates buggy comparisons, like gcc
+       versions < 8.
+
 2024-08-26  Bruno Haible  <bruno@clisp.org>
 
        Fix some of the warnings from a clang that masquerades as gcc 13.
index 166454080e5af48990e57eae91eb4e07c82a4005..e3c7299a67cd969861cc617f1aa6d409bfb5decb 100644 (file)
@@ -450,11 +450,11 @@ main (int argc, char *argv[])
             only when a source operand is an SNaN. The COMISD instruction
             signals an invalid numeric exception only if a source operand is
             either an SNaN or a QNaN."
-         - gcc < 8 (except when option -mno-ieee-fp is used) generates 'ucom*'
-           or 'fucom*' instructions and thus fails the test.
+         - gcc < 8 (except when option -mno-ieee-fp is used) and clang generate
+           'ucom*' or 'fucom*' instructions and thus fail the test.
          - gcc >= 8 generates 'com*' or 'fcom*' instructions and thus passes
            the test.  */
-      #if (__GLIBC__ >= 2 && ((defined __x86_64__ || defined _M_X64) || (defined __i386 || defined _M_IX86)) && __GNUC__ < 8) \
+      #if (__GLIBC__ >= 2 && ((defined __x86_64__ || defined _M_X64) || (defined __i386 || defined _M_IX86)) && (__GNUC__ < 8 || defined __clang__)) \
           || (__GLIBC__ >= 2 && (defined __powerpc__ || (defined __s390__ || defined __s390x__))) \
           || (__GLIBC__ >= 2 && __FreeBSD_kernel__ && ((defined __x86_64__ || defined _M_X64) || (defined __i386 || defined _M_IX86))) \
           || (defined MUSL_LIBC && ((defined __i386 || defined _M_IX86) || defined __powerpc__)) \