[Bug libstdc++/89461] FAIL: experimental/net/timer/waitable/cons.cc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89461 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED Target Milestone|--- |9.0 --- Comment #11 from Andrew Pinski --- Fixed.
[Bug libstdc++/89461] FAIL: experimental/net/timer/waitable/cons.cc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89461 --- Comment #10 from Andrew Pinski --- *** Bug 69331 has been marked as a duplicate of this bug. ***
[Bug libstdc++/89461] FAIL: experimental/net/timer/waitable/cons.cc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89461 --- Comment #9 from John David Anglin --- Author: danglin Date: Tue Mar 12 23:13:36 2019 New Revision: 269628 URL: https://gcc.gnu.org/viewcvs?rev=269628=gcc=rev Log: PR libstdc++/89461 * testsuite/lib/libstdc++.exp: Locate libatomic. * testsuite/lib/dg-options.exp (add_options_for_libatomic): New. * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add libatomic options. * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise. * testsuite/experimental/net/timer/waitable/cons.cc: Likewise. * testsuite/experimental/net/timer/waitable/dest.cc: Likewise. * testsuite/experimental/net/timer/waitable/ops.cc: Likewise. Modified: trunk/libstdc++-v3/ChangeLog trunk/libstdc++-v3/testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc trunk/libstdc++-v3/testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc trunk/libstdc++-v3/testsuite/experimental/net/timer/waitable/cons.cc trunk/libstdc++-v3/testsuite/experimental/net/timer/waitable/dest.cc trunk/libstdc++-v3/testsuite/experimental/net/timer/waitable/ops.cc trunk/libstdc++-v3/testsuite/lib/dg-options.exp trunk/libstdc++-v3/testsuite/lib/libstdc++.exp
[Bug libstdc++/89461] FAIL: experimental/net/timer/waitable/cons.cc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89461 --- Comment #8 from John David Anglin --- Created attachment 45873 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45873=edit Patch This patch fixes the tests that need to link against libatomic on hppa. We need to add path to libatomic to LD_LIBRARY_PATH. I'm not particularly happy about the relative path in the extra options.
[Bug libstdc++/89461] FAIL: experimental/net/timer/waitable/cons.cc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89461 --- Comment #7 from dave.anglin at bell dot net --- On 2019-02-27 4:24 a.m., redi at gcc dot gnu.org wrote: > Maybe libstdc++ should just link to libatomic unconditionally for your target. Yes, I'm trying that in current build. The issue is certain functions are implemented inline on most architectures but not on hppa-hpux. There are a couple of other tests in the same boat.
[Bug libstdc++/89461] FAIL: experimental/net/timer/waitable/cons.cc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89461 --- Comment #6 from dave.anglin at bell dot net --- On 2019-02-27 4:19 a.m., fw at gcc dot gnu.org wrote: > Is it really true that 64-bit PA-RISC lacks 64-bit atomics? That's … awkward. PA-RISC only has two atomic instructions (ldcw and ldcd). These are insufficient to implement a full set of 32-bit atomics without kernel support. In the 32-bit runtime, we can't in general use the ldd and std instructions as the upper 32 register bits are not guaranteed to be preserved during context switches. So, one has to use 64-bit floating point loads and stores to ensure the operation operates atomically on memory. This makes 64-bit atomics really ugly with a 32-bit kernel. We have implemented a kernel helper to implement atomic support on linux. There is no documented kernel helper on hpux although I believe HP implemented pthread support using light weight system calls. Using a kernel helper, tends to make atomics very slow when there is contention. I tend to think using 64-bit atomics on 32-bit architectures is not a good idea. Dave
[Bug libstdc++/89461] FAIL: experimental/net/timer/waitable/cons.cc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89461 --- Comment #5 from Jonathan Wakely --- Maybe libstdc++ should just link to libatomic unconditionally for your target.
[Bug libstdc++/89461] FAIL: experimental/net/timer/waitable/cons.cc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89461 Florian Weimer changed: What|Removed |Added CC||fw at gcc dot gnu.org --- Comment #4 from Florian Weimer --- Is it really true that 64-bit PA-RISC lacks 64-bit atomics? That's … awkward.
[Bug libstdc++/89461] FAIL: experimental/net/timer/waitable/cons.cc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89461 --- Comment #3 from dave.anglin at bell dot net --- On 2019-02-23 2:34 p.m., redi at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89461 > > --- Comment #2 from Jonathan Wakely --- > Oops, that should be: > > --- a/libstdc++-v3/include/experimental/io_context > +++ b/libstdc++-v3/include/experimental/io_context > @@ -134,7 +134,8 @@ inline namespace v1 >io_context* _M_ctx; > }; > > -using count_type = size_t; > +using count_type > + = conditional_t int>; > > // construct / copy / destroy: Makes things worse. I think we need to be using a mutes.
[Bug libstdc++/89461] FAIL: experimental/net/timer/waitable/cons.cc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89461 --- Comment #2 from Jonathan Wakely --- Oops, that should be: --- a/libstdc++-v3/include/experimental/io_context +++ b/libstdc++-v3/include/experimental/io_context @@ -134,7 +134,8 @@ inline namespace v1 io_context* _M_ctx; }; -using count_type = size_t; +using count_type + = conditional_t; // construct / copy / destroy:
[Bug libstdc++/89461] FAIL: experimental/net/timer/waitable/cons.cc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89461 --- Comment #1 from Jonathan Wakely --- This might help, but probably isn't the right fix: --- a/libstdc++-v3/include/experimental/io_context +++ b/libstdc++-v3/include/experimental/io_context @@ -134,7 +134,8 @@ inline namespace v1 io_context* _M_ctx; }; -using count_type = size_t; +using count_type + = conditional_t::is_always_lock_free(), size_t, int>; // construct / copy / destroy: