]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Add workaround for ia32 floating atomics miscompilations [PR100184]
authorJakub Jelinek <jakub@redhat.com>
Thu, 22 Apr 2021 13:08:21 +0000 (15:08 +0200)
committerJakub Jelinek <jakub@redhat.com>
Thu, 22 Apr 2021 13:09:58 +0000 (15:09 +0200)
gcc on ia32 miscompiles various atomics involving floating point,
unfortunately I'm afraid it is too late to fix that for 11.1 and
as I'm quite lost on it, it might take a while for 12 too
(disabling all the 8 peephole2s would be easiest, but then we'd
run into optimization regressions).

While 1.cc just FAILs, with dejagnu 1.6.1 wait_notify.cc hangs the
make check even after the timeout fires.  The following patch therefore
xfails the former and skips the latter.

Tested on x86_64-linux where
make check RUNTESTFLAGS='conformance.exp=atomic_float/*.cc'
is still
                === libstdc++ Summary ===

 # of expected passes            8
and on i686-linux, where it is now
                === libstdc++ Summary ===

 # of expected passes            5
 # of expected failures          1
 # of unsupported tests          1

2021-04-22  Jakub Jelinek  <jakub@redhat.com>

PR target/100182
* testsuite/29_atomics/atomic_float/1.cc: Add dg-xfail-run-if for
ia32.
* testsuite/29_atomics/atomic_float/wait_notify.cc: Add dg-skip-if for
ia32.

libstdc++-v3/testsuite/29_atomics/atomic_float/1.cc
libstdc++-v3/testsuite/29_atomics/atomic_float/wait_notify.cc

index b2008368a95a79a1ebf29c0ea56f61269f0503be..797d3b7ecbe813201ce88065ff9413a068b7b07b 100644 (file)
@@ -18,6 +18,7 @@
 // { dg-add-options ieee }
 // { dg-options "-std=gnu++2a" }
 // { dg-do run { target c++2a } }
+// { dg-xfail-run-if "PR100182" { ia32 } }
 
 #include <atomic>
 #include <testsuite_hooks.h>
index 01768da290b75868586e0456169f88a8961147fd..e0ff34dbf24d9173e20fe0a6c2445d92342fc058 100644 (file)
@@ -2,6 +2,7 @@
 // { dg-do run { target c++2a } }
 // { dg-require-gthreads "" }
 // { dg-additional-options "-pthread" { target pthread } }
+// { dg-skip-if "PR100182" { ia32 } }
 // { dg-add-options libatomic }
 
 // Copyright (C) 2020-2021 Free Software Foundation, Inc.