On 21/11/20 16:36 -0800, H.J. Lu wrote:
On Sat, Nov 21, 2020 at 9:40 AM Jonathan Wakely via Gcc-patches <[email protected]> wrote:On 21/11/20 17:04 +0000, Jonathan Wakely wrote: >On 21/11/20 16:16 +0100, Andreas Schwab wrote: >>In file included from /daten/aranym/gcc/gcc-20201121/Build/m68k-linux/libstdc++-v3/include/bits/shared_ptr_atomic.h:33, >> from /daten/aranym/gcc/gcc-20201121/Build/m68k-linux/libstdc++-v3/include/memory:78, >> from /daten/aranym/gcc/gcc-20201121/Build/m68k-linux/libstdc++-v3/include/m68k-linux/bits/stdc++.h:82, >> from /daten/aranym/gcc/gcc-20201121/Build/m68k-linux/libstdc++-v3/include/m68k-linux/bits/extc++.h:32, >> from /daten/aranym/gcc/gcc-20201121/libstdc++-v3/testsuite/17_intro/headers/c++2020/all_attributes.cc:37: >>/daten/aranym/gcc/gcc-20201121/Build/m68k-linux/libstdc++-v3/include/bits/atomic_base.h: In member function 'void std::atomic_flag::wait(bool, std::memory_order) const': >>/daten/aranym/gcc/gcc-20201121/Build/m68k-linux/libstdc++-v3/include/bits/atomic_base.h:239: error: no matching function for call to '__atomic_wait(const __atomic_flag_data_type*, bool&, std::atomic_flag::wait(bool, std::memory_order) const::<lambda()>)' >>In file included from /daten/aranym/gcc/gcc-20201121/Build/m68k-linux/libstdc++-v3/include/bits/atomic_base.h:41, >> from /daten/aranym/gcc/gcc-20201121/Build/m68k-linux/libstdc++-v3/include/bits/shared_ptr_atomic.h:33, >> from /daten/aranym/gcc/gcc-20201121/Build/m68k-linux/libstdc++-v3/include/memory:78, >> from /daten/aranym/gcc/gcc-20201121/Build/m68k-linux/libstdc++-v3/include/m68k-linux/bits/stdc++.h:82, >> from /daten/aranym/gcc/gcc-20201121/Build/m68k-linux/libstdc++-v3/include/m68k-linux/bits/extc++.h:32, >> from /daten/aranym/gcc/gcc-20201121/libstdc++-v3/testsuite/17_intro/headers/c++2020/all_attributes.cc:37: >>/daten/aranym/gcc/gcc-20201121/Build/m68k-linux/libstdc++-v3/include/bits/atomic_wait.h:265: note: candidate: 'template<class _Tp, class _Pred> void std::__atomic_wait(const _Tp*, _Tp, _Pred)' >>/daten/aranym/gcc/gcc-20201121/Build/m68k-linux/libstdc++-v3/include/bits/atomic_wait.h:265: note: template argument deduction/substitution failed: >>In file included from /daten/aranym/gcc/gcc-20201121/Build/m68k-linux/libstdc++-v3/include/bits/shared_ptr_atomic.h:33, >> from /daten/aranym/gcc/gcc-20201121/Build/m68k-linux/libstdc++-v3/include/memory:78, >> from /daten/aranym/gcc/gcc-20201121/Build/m68k-linux/libstdc++-v3/include/m68k-linux/bits/stdc++.h:82, >> from /daten/aranym/gcc/gcc-20201121/Build/m68k-linux/libstdc++-v3/include/m68k-linux/bits/extc++.h:32, >> from /daten/aranym/gcc/gcc-20201121/libstdc++-v3/testsuite/17_intro/headers/c++2020/all_attributes.cc:37: >>/daten/aranym/gcc/gcc-20201121/Build/m68k-linux/libstdc++-v3/include/bits/atomic_base.h:239: note: deduced conflicting types for parameter '_Tp' ('unsigned char' and 'bool') > >I'm testing this. I'm committing this instead, it's the same but also disables 29_atomics/atomic/wait_notify/generic.cc on non-linux targets. Tested sparc-solaris2.11 and powerpc64le-linux. There are still some timeouts on linux: FAIL: 30_threads/latch/3.cc execution test FAIL: 30_threads/semaphore/try_acquire_for.cc execution testI opened: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97936
I've disabled the failing tests for now. They can be re-enabled after the problem is found and fixed. Committed to trunk.
commit a3313a2214a6253672ab4fa37a2dcf57fd0f8dce Author: Jonathan Wakely <[email protected]> Date: Tue Nov 24 23:22:01 2020 libstdc++: Disable failing tests [PR 97936] These tests are unstable and causing failures due to timeouts. Disable them until the cause can be found, so that testing doesn't have to wait for them to timeout. libstdc++-v3/ChangeLog: PR libstdc++/97936 PR libstdc++/97944 * testsuite/29_atomics/atomic_integral/wait_notify.cc: Disable. Do not require pthreads, but add -pthread when appropriate. * testsuite/30_threads/jthread/95989.cc: Likewise. * testsuite/30_threads/latch/3.cc: Likewise. * testsuite/30_threads/semaphore/try_acquire_until.cc: Likewise. diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_integral/wait_notify.cc b/libstdc++-v3/testsuite/29_atomics/atomic_integral/wait_notify.cc index abf2bfdbee96..762583cf8c76 100644 --- a/libstdc++-v3/testsuite/29_atomics/atomic_integral/wait_notify.cc +++ b/libstdc++-v3/testsuite/29_atomics/atomic_integral/wait_notify.cc @@ -1,8 +1,9 @@ -// { dg-options "-std=gnu++2a -pthread" } +// { dg-options "-std=gnu++2a" } // { dg-do run { target c++2a } } -// { dg-require-effective-target pthread } // { dg-require-gthreads "" } // { dg-add-options libatomic } +// { dg-additional-options "-pthread" { target pthread } } +// { dg-skip-if "broken" { *-*-* } } // Copyright (C) 2020 Free Software Foundation, Inc. // diff --git a/libstdc++-v3/testsuite/30_threads/jthread/95989.cc b/libstdc++-v3/testsuite/30_threads/jthread/95989.cc index c7a9430eee90..a179eab38198 100644 --- a/libstdc++-v3/testsuite/30_threads/jthread/95989.cc +++ b/libstdc++-v3/testsuite/30_threads/jthread/95989.cc @@ -20,6 +20,7 @@ // { dg-require-gthreads {} } // { dg-additional-options "-pthread" { target pthread } } // { dg-additional-options "-static" { target static } } +// { dg-skip-if "broken" { *-*-* } } #include <thread> diff --git a/libstdc++-v3/testsuite/30_threads/latch/3.cc b/libstdc++-v3/testsuite/30_threads/latch/3.cc index 5d08000f4302..6304135a877c 100644 --- a/libstdc++-v3/testsuite/30_threads/latch/3.cc +++ b/libstdc++-v3/testsuite/30_threads/latch/3.cc @@ -15,11 +15,12 @@ // with this library; see the file COPYING3. If not see // <http://www.gnu.org/licenses/>. -// { dg-options "-std=gnu++2a -pthread" } +// { dg-options "-std=gnu++2a" } // { dg-do run { target c++2a } } -// { dg-require-effective-target pthread } // { dg-require-gthreads "" } -// +// { dg-additional-options "-pthread" { target pthread } } +// { dg-skip-if "broken" { *-*-* } } + #include <latch> #include <atomic> #include <thread> diff --git a/libstdc++-v3/testsuite/30_threads/semaphore/try_acquire_until.cc b/libstdc++-v3/testsuite/30_threads/semaphore/try_acquire_until.cc index af7ab7bac395..5e1141425f72 100644 --- a/libstdc++-v3/testsuite/30_threads/semaphore/try_acquire_until.cc +++ b/libstdc++-v3/testsuite/30_threads/semaphore/try_acquire_until.cc @@ -15,10 +15,11 @@ // with this library; see the file COPYING3. If not see // <http://www.gnu.org/licenses/>. -// { dg-options "-std=gnu++2a -pthread" } +// { dg-options "-std=gnu++2a" } // { dg-do run { target c++2a } } -// { dg-require-effective-target pthread } // { dg-require-gthreads "" } +// { dg-additional-options "-pthread" { target pthread } } +// { dg-skip-if "broken" { *-*-* } } #include <semaphore> #include <chrono>
