public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/114103] New: FAIL: 29_atomics/atomic/lock_free_aliases.cc -std=gnu++20 (test for excess errors)
@ 2024-02-25 17:47 danglin at gcc dot gnu.org
2024-02-26 10:54 ` [Bug libstdc++/114103] " redi at gcc dot gnu.org
` (18 more replies)
0 siblings, 19 replies; 20+ messages in thread
From: danglin at gcc dot gnu.org @ 2024-02-25 17:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114103
Bug ID: 114103
Summary: FAIL: 29_atomics/atomic/lock_free_aliases.cc
-std=gnu++20 (test for excess errors)
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: danglin at gcc dot gnu.org
Target Milestone: ---
Host: hppa64-hp-hpux11.11
Target: hppa64-hp-hpux11.11
Build: hppa64-hp-hpux11.11
spawn -ignore SIGHUP /home/dave/gnu/gcc/objdir64/./gcc/xg++ -shared-libgcc
-B/ho
me/dave/gnu/gcc/objdir64/./gcc -nostdinc++
-L/home/dave/gnu/gcc/objdir64/hppa64-
hp-hpux11.11/libstdc++-v3/src
-L/home/dave/gnu/gcc/objdir64/hppa64-hp-hpux11.11/
libstdc++-v3/src/.libs
-L/home/dave/gnu/gcc/objdir64/hppa64-hp-hpux11.11/libstdc
++-v3/libsupc++/.libs -B/opt/gnu64/gcc/gcc-14/hppa64-hp-hpux11.11/bin/
-B/opt/gn
u64/gcc/gcc-14/hppa64-hp-hpux11.11/lib/ -isystem
/opt/gnu64/gcc/gcc-14/hppa64-hp
-hpux11.11/include -isystem
/opt/gnu64/gcc/gcc-14/hppa64-hp-hpux11.11/sys-includ
e -fchecking=1
-B/home/dave/gnu/gcc/objdir64/hppa64-hp-hpux11.11/./libstdc++-v3/
src/.libs -fmessage-length=0 -fno-show-column -ffunction-sections
-fdata-section
s -O2 -g -DLOCALEDIR="." -nostdinc++
-I/home/dave/gnu/gcc/objdir64/hppa64-hp-hpu
x11.11/libstdc++-v3/include/hppa64-hp-hpux11.11
-I/home/dave/gnu/gcc/objdir64/hppa64-hp-hpux11.11/libstdc++-v3/include
-I/home/dave/gnu/gcc/gcc/libstdc++-v3/libsupc++
-I/home/dave/gnu/gcc/gcc/libstdc++-v3/include/backward
-I/home/dave/gnu/gcc/gcc/libstdc++-v3/testsuite/util
/home/dave/gnu/gcc/gcc/libstdc++-v3/testsuite/29_atomics/atomic/lock_free_aliases.cc
-std=gnu++20 -D__GLIBCXX__=99999999 -fdiagnostics-plain-output -S -o
lock_free_aliases.s
/home/dave/gnu/gcc/gcc/libstdc++-v3/testsuite/29_atomics/atomic/lock_free_aliases.cc:33:
error: static assertion failed
/home/dave/gnu/gcc/gcc/libstdc++-v3/testsuite/29_atomics/atomic/lock_free_aliases.cc:34:
error: static assertion failed
compiler exited with status 1
FAIL: 29_atomics/atomic/lock_free_aliases.cc -std=gnu++20 (test for excess
errors)
Excess errors:
/home/dave/gnu/gcc/gcc/libstdc++-v3/testsuite/29_atomics/atomic/lock_free_aliases.cc:33:
error: static assertion failed
/home/dave/gnu/gcc/gcc/libstdc++-v3/testsuite/29_atomics/atomic/lock_free_aliases.cc:34:
error: static assertion failed
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug libstdc++/114103] FAIL: 29_atomics/atomic/lock_free_aliases.cc -std=gnu++20 (test for excess errors)
2024-02-25 17:47 [Bug libstdc++/114103] New: FAIL: 29_atomics/atomic/lock_free_aliases.cc -std=gnu++20 (test for excess errors) danglin at gcc dot gnu.org
@ 2024-02-26 10:54 ` redi at gcc dot gnu.org
2024-02-26 10:55 ` redi at gcc dot gnu.org
` (17 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: redi at gcc dot gnu.org @ 2024-02-26 10:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114103
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
We define them as:
#ifdef __cpp_lib_atomic_lock_free_type_aliases
# ifdef _GLIBCXX_HAVE_PLATFORM_WAIT
using atomic_signed_lock_free
= atomic<make_signed_t<__detail::__platform_wait_t>>;
using atomic_unsigned_lock_free
= atomic<make_unsigned_t<__detail::__platform_wait_t>>;
# elif ATOMIC_INT_LOCK_FREE || !(ATOMIC_LONG_LOCK_FREE ||
ATOMIC_CHAR_LOCK_FREE)
using atomic_signed_lock_free = atomic<signed int>;
using atomic_unsigned_lock_free = atomic<unsigned int>;
# elif ATOMIC_LONG_LOCK_FREE
using atomic_signed_lock_free = atomic<signed long>;
using atomic_unsigned_lock_free = atomic<unsigned long>;
# elif ATOMIC_CHAR_LOCK_FREE
using atomic_signed_lock_free = atomic<signed char>;
using atomic_unsigned_lock_free = atomic<unsigned char>;
# else
# error "libstdc++ bug: no lock-free atomics but they were emitted in
<version>"
# endif
#endif
And then test them with:
static_assert( std::atomic_signed_lock_free::is_always_lock_free );
static_assert( std::atomic_unsigned_lock_free::is_always_lock_free );
I assume the problem is that the ATOMIC_xxx_LOCK_FREE macros have value 1 not
2, so they're not unconditionally lock-free.
Are any of the atomic integer types always lock-free for this target?
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug libstdc++/114103] FAIL: 29_atomics/atomic/lock_free_aliases.cc -std=gnu++20 (test for excess errors)
2024-02-25 17:47 [Bug libstdc++/114103] New: FAIL: 29_atomics/atomic/lock_free_aliases.cc -std=gnu++20 (test for excess errors) danglin at gcc dot gnu.org
2024-02-26 10:54 ` [Bug libstdc++/114103] " redi at gcc dot gnu.org
@ 2024-02-26 10:55 ` redi at gcc dot gnu.org
2024-02-26 10:56 ` redi at gcc dot gnu.org
` (16 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: redi at gcc dot gnu.org @ 2024-02-26 10:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114103
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Created attachment 57539
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57539&action=edit
make lock-free aliases actually check for lock freedom
Maybe we want to do this.
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug libstdc++/114103] FAIL: 29_atomics/atomic/lock_free_aliases.cc -std=gnu++20 (test for excess errors)
2024-02-25 17:47 [Bug libstdc++/114103] New: FAIL: 29_atomics/atomic/lock_free_aliases.cc -std=gnu++20 (test for excess errors) danglin at gcc dot gnu.org
2024-02-26 10:54 ` [Bug libstdc++/114103] " redi at gcc dot gnu.org
2024-02-26 10:55 ` redi at gcc dot gnu.org
@ 2024-02-26 10:56 ` redi at gcc dot gnu.org
2024-02-26 12:21 ` dave.anglin at bell dot net
` (15 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: redi at gcc dot gnu.org @ 2024-02-26 10:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114103
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #57539|0 |1
is obsolete| |
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Created attachment 57540
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57540&action=edit
make lock-free aliases actually check for lock freedom
Oops, let's try that again without unrelated changes in the patch.
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug libstdc++/114103] FAIL: 29_atomics/atomic/lock_free_aliases.cc -std=gnu++20 (test for excess errors)
2024-02-25 17:47 [Bug libstdc++/114103] New: FAIL: 29_atomics/atomic/lock_free_aliases.cc -std=gnu++20 (test for excess errors) danglin at gcc dot gnu.org
` (2 preceding siblings ...)
2024-02-26 10:56 ` redi at gcc dot gnu.org
@ 2024-02-26 12:21 ` dave.anglin at bell dot net
2024-02-26 12:22 ` redi at gcc dot gnu.org
` (14 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: dave.anglin at bell dot net @ 2024-02-26 12:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114103
--- Comment #4 from dave.anglin at bell dot net ---
On 2024-02-26 5:54 a.m., redi at gcc dot gnu.org wrote:
> I assume the problem is that the ATOMIC_xxx_LOCK_FREE macros have value 1 not
> 2, so they're not unconditionally lock-free.
>
> Are any of the atomic integer types always lock-free for this target?
No. The only "lock free" operations are load and clear word/double word.
On linux, we fudge the support in the kernel where we can disable interrupts
but the operation
still can spin.
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug libstdc++/114103] FAIL: 29_atomics/atomic/lock_free_aliases.cc -std=gnu++20 (test for excess errors)
2024-02-25 17:47 [Bug libstdc++/114103] New: FAIL: 29_atomics/atomic/lock_free_aliases.cc -std=gnu++20 (test for excess errors) danglin at gcc dot gnu.org
` (3 preceding siblings ...)
2024-02-26 12:21 ` dave.anglin at bell dot net
@ 2024-02-26 12:22 ` redi at gcc dot gnu.org
2024-02-26 12:25 ` dave.anglin at bell dot net
` (13 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: redi at gcc dot gnu.org @ 2024-02-26 12:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114103
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
OK then I think we don't want these aliases to be defined at all (which means
we cannot be fully C++20 conformant) and the test should be xfailed or skipped.
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug libstdc++/114103] FAIL: 29_atomics/atomic/lock_free_aliases.cc -std=gnu++20 (test for excess errors)
2024-02-25 17:47 [Bug libstdc++/114103] New: FAIL: 29_atomics/atomic/lock_free_aliases.cc -std=gnu++20 (test for excess errors) danglin at gcc dot gnu.org
` (4 preceding siblings ...)
2024-02-26 12:22 ` redi at gcc dot gnu.org
@ 2024-02-26 12:25 ` dave.anglin at bell dot net
2024-02-27 14:32 ` redi at gcc dot gnu.org
` (12 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: dave.anglin at bell dot net @ 2024-02-26 12:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114103
--- Comment #6 from dave.anglin at bell dot net ---
On 2024-02-26 7:22 a.m., redi at gcc dot gnu.org wrote:
> OK then I think we don't want these aliases to be defined at all (which means
> we cannot be fully C++20 conformant) and the test should be xfailed or skipped.
That's what I was thinking.
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug libstdc++/114103] FAIL: 29_atomics/atomic/lock_free_aliases.cc -std=gnu++20 (test for excess errors)
2024-02-25 17:47 [Bug libstdc++/114103] New: FAIL: 29_atomics/atomic/lock_free_aliases.cc -std=gnu++20 (test for excess errors) danglin at gcc dot gnu.org
` (5 preceding siblings ...)
2024-02-26 12:25 ` dave.anglin at bell dot net
@ 2024-02-27 14:32 ` redi at gcc dot gnu.org
2024-02-27 20:49 ` dave.anglin at bell dot net
` (11 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: redi at gcc dot gnu.org @ 2024-02-27 14:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114103
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
Last reconfirmed| |2024-02-27
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Patch posted:
https://gcc.gnu.org/pipermail/gcc-patches/2024-February/646619.html
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug libstdc++/114103] FAIL: 29_atomics/atomic/lock_free_aliases.cc -std=gnu++20 (test for excess errors)
2024-02-25 17:47 [Bug libstdc++/114103] New: FAIL: 29_atomics/atomic/lock_free_aliases.cc -std=gnu++20 (test for excess errors) danglin at gcc dot gnu.org
` (6 preceding siblings ...)
2024-02-27 14:32 ` redi at gcc dot gnu.org
@ 2024-02-27 20:49 ` dave.anglin at bell dot net
2024-02-28 1:04 ` dave.anglin at bell dot net
` (10 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: dave.anglin at bell dot net @ 2024-02-27 20:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114103
--- Comment #8 from dave.anglin at bell dot net ---
On 2024-02-27 9:32 a.m., redi at gcc dot gnu.org wrote:
> Patch posted:
> https://gcc.gnu.org/pipermail/gcc-patches/2024-February/646619.html
Will test on hppa64-hp-hpux11.11 on my next build.
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug libstdc++/114103] FAIL: 29_atomics/atomic/lock_free_aliases.cc -std=gnu++20 (test for excess errors)
2024-02-25 17:47 [Bug libstdc++/114103] New: FAIL: 29_atomics/atomic/lock_free_aliases.cc -std=gnu++20 (test for excess errors) danglin at gcc dot gnu.org
` (7 preceding siblings ...)
2024-02-27 20:49 ` dave.anglin at bell dot net
@ 2024-02-28 1:04 ` dave.anglin at bell dot net
2024-02-28 9:31 ` redi at gcc dot gnu.org
` (9 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: dave.anglin at bell dot net @ 2024-02-28 1:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114103
--- Comment #9 from dave.anglin at bell dot net ---
On 2024-02-27 9:32 a.m., redi at gcc dot gnu.org wrote:
> Patch posted:
> https://gcc.gnu.org/pipermail/gcc-patches/2024-February/646619.html
Caused build error:
libtool: compile: /home/dave/gnu/gcc/objdir64/./gcc/xgcc -shared-libgcc
-B/home
/dave/gnu/gcc/objdir64/./gcc -nostdinc++
-L/home/dave/gnu/gcc/objdir64/hppa64-hp
-hpux11.11/libstdc++-v3/src
-L/home/dave/gnu/gcc/objdir64/hppa64-hp-hpux11.11/li
bstdc++-v3/src/.libs
-L/home/dave/gnu/gcc/objdir64/hppa64-hp-hpux11.11/libstdc++
-v3/libsupc++/.libs -B/opt/gnu64/gcc/gcc-14/hppa64-hp-hpux11.11/bin/
-B/opt/gnu6
4/gcc/gcc-14/hppa64-hp-hpux11.11/lib/ -isystem
/opt/gnu64/gcc/gcc-14/hppa64-hp-h
pux11.11/include -isystem /opt/gnu64/gcc/gcc-14/hppa64-hp-hpux11.11/sys-include
-fno-checking -I/home/dave/gnu/gcc/gcc/libstdc++-v3/../libgcc
-I/home/dave/gnu/gcc/objdir64/hppa64-hp-hpux11.11/libstdc++-v3/include/hppa64-hp-hpux11.11
-I/home/dave/gnu/gcc/objdir64/hppa64-hp-hpux11.11/libstdc++-v3/include
-I/home/dave/gnu/gcc/gcc/libstdc++-v3/libsupc++ -std=gnu++20
-D_GLIBCXX_SHARED -fno-implicit-templates -Wall -Wextra -Wwrite-strings
-Wcast-qual -Wabi=2 -fdiagnostics-show-location=once -ffunction-sections
-fdata-sections -frandom-seed=tzdb.lo -fimplicit-templates -O2 -g -I. -c
../../../../../gcc/libstdc++-v3/src/c++20/tzdb.cc -DPIC
-D_GLIBCXX_SHARED -o tzdb.o
../../../../../gcc/libstdc++-v3/src/c++20/tzdb.cc:654:9: error:
'atomic_signed_lock_free' does not name a type
654 | atomic_signed_lock_free counter{0};
| ^~~~~~~~~~~~~~~~~~~~~~~
../../../../../gcc/libstdc++-v3/src/c++20/tzdb.cc:706:18: error:
'atomic_signed_lock_free' was not declared in this scope; did you mean
'atomic_is_lock_free'?
706 | RulesCounter<atomic_signed_lock_free> rules_counter;
| ^~~~~~~~~~~~~~~~~~~~~~~
| atomic_is_lock_free
../../../../../gcc/libstdc++-v3/src/c++20/tzdb.cc:706:41: error: template
argument 1 is invalid
706 | RulesCounter<atomic_signed_lock_free> rules_counter;
| ^
../../../../../gcc/libstdc++-v3/src/c++20/tzdb.cc: In member function 'void
std::chrono::time_zone::_Impl::RulesCounter<_Tp>::increment()':
../../../../../gcc/libstdc++-v3/src/c++20/tzdb.cc:658:11: error: 'counter' was
not declared in this scope; did you mean 'count'?
658 | { counter.fetch_add(1, memory_order::relaxed); }
| ^~~~~~~
| count
../../../../../gcc/libstdc++-v3/src/c++20/tzdb.cc: In member function 'void
std::chrono::time_zone::_Impl::RulesCounter<_Tp>::decrement()':
../../../../../gcc/libstdc++-v3/src/c++20/tzdb.cc:668:17: error: 'counter' was
not declared in this scope; did you mean 'count'?
668 | if (++counter == 0)
| ^~~~~~~
| count
../../../../../gcc/libstdc++-v3/src/c++20/tzdb.cc: In member function 'void
std::chrono::time_zone::_Impl::RulesCounter<_Tp>::lock()':
../../../../../gcc/libstdc++-v3/src/c++20/tzdb.cc:679:25: error: 'counter' was
not declared in this scope; did you mean 'count'?
679 | for (auto c = counter.load(memory_order::relaxed); c != 0;)
| ^~~~~~~
| count
../../../../../gcc/libstdc++-v3/src/c++20/tzdb.cc: In member function 'void
std::chrono::time_zone::_Impl::RulesCounter<_Tp>::unlock()':
../../../../../gcc/libstdc++-v3/src/c++20/tzdb.cc:697:24: error: 'counter' was
not declared in this scope; did you mean 'count'?
697 | if (auto c = counter.load(memory_order::relaxed); c < 0)
| ^~~~~~~
| count
../../../../../gcc/libstdc++-v3/src/c++20/tzdb.cc: In member function
'std::chrono::sys_info
std::chrono::time_zone::_M_get_sys_info(std::chrono::sys_seconds) const':
../../../../../gcc/libstdc++-v3/src/c++20/tzdb.cc:969:32: error: request for
member 'decrement' in '((const
std::chrono::time_zone*)this)->std::chrono::time_zone::_M_impl.std::unique_ptr<std::chrono::time_zone::_Impl>::operator->()->std::chrono::time_zone::_Impl::rules_counter',
which is of non-class type 'int'
969 | _M_impl->rules_counter.decrement();
| ^~~~~~~~~
../../../../../gcc/libstdc++-v3/src/c++20/tzdb.cc: In function 'const
std::chrono::tzdb& std::chrono::reload_tzdb()':
../../../../../gcc/libstdc++-v3/src/c++20/tzdb.cc:1488:38: error: request for
member 'increment' in
'impl.std::chrono::time_zone::_Impl::rules_counter', which is of non-class type
'int'
1488 | impl.rules_counter.increment();
| ^~~~~~~~~
In file included from
/home/dave/gnu/gcc/objdir64/hppa64-hp-hpux11.11/libstdc++-v3/include/bits/atomic_wait.h:51,
from
/home/dave/gnu/gcc/objdir64/hppa64-hp-hpux11.11/libstdc++-v3/include/bits/atomic_base.h:42,
from
/home/dave/gnu/gcc/objdir64/hppa64-hp-hpux11.11/libstdc++-v3/include/atomic:50,
from ../../../../../gcc/libstdc++-v3/src/c++20/tzdb.cc:35:
/home/dave/gnu/gcc/objdir64/hppa64-hp-hpux11.11/libstdc++-v3/include/bits/std_mutex.h:
In instantiation of
'std::lock_guard<_Mutex>::lock_guard(mutex_type&) [with _Mutex = int;
mutex_type = int]':
../../../../../gcc/libstdc++-v3/src/c++20/tzdb.cc:779:43: required from here
../../../../../gcc/libstdc++-v3/src/c++20/tzdb.cc:1488:38: error: 779 |
lock_guard lock(_M_impl->rules_counter);
../../../../../gcc/libstdc++-v3/src/c++20/tzdb.cc:1488:38: error: |
^
/home/dave/gnu/gcc/objdir64/hppa64-hp-hpux11.11/libstdc++-v3/include/bits/std_mutex.h:250:19:
error: request for member 'lock' in
'((std::lock_guard<int>*)this)->std::lock_guard<int>::_M_device', which is of
non-class type 'std::lock_guard<int>::mutex_type' {aka 'int'}
250 | { _M_device.lock(); }
| ~~~~~~~~~~^~~~
/home/dave/gnu/gcc/objdir64/hppa64-hp-hpux11.11/libstdc++-v3/include/bits/std_mutex.h:
In instantiation of
'std::lock_guard<_Mutex>::~lock_guard() [with _Mutex = int]':
../../../../../gcc/libstdc++-v3/src/c++20/tzdb.cc:779:43: required from here
/home/dave/gnu/gcc/objdir64/hppa64-hp-hpux11.11/libstdc++-v3/include/bits/std_mutex.h:250:19:
error: 779 | lock_guard
lock(_M_impl->rules_counter);
/home/dave/gnu/gcc/objdir64/hppa64-hp-hpux11.11/libstdc++-v3/include/bits/std_mutex.h:250:19:
error:
| ^
/home/dave/gnu/gcc/objdir64/hppa64-hp-hpux11.11/libstdc++-v3/include/bits/std_mutex.h:257:19:
error: request for member 'unlock' in
'((std::lock_guard<int>*)this)->std::lock_guard<int>::_M_device', which is of
non-class type 'std::lock_guard<int>::mutex_type' {aka 'int'}
257 | { _M_device.unlock(); }
| ~~~~~~~~~~^~~~~~
make[6]: *** [Makefile:754: tzdb.lo] Error 1
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug libstdc++/114103] FAIL: 29_atomics/atomic/lock_free_aliases.cc -std=gnu++20 (test for excess errors)
2024-02-25 17:47 [Bug libstdc++/114103] New: FAIL: 29_atomics/atomic/lock_free_aliases.cc -std=gnu++20 (test for excess errors) danglin at gcc dot gnu.org
` (8 preceding siblings ...)
2024-02-28 1:04 ` dave.anglin at bell dot net
@ 2024-02-28 9:31 ` redi at gcc dot gnu.org
2024-02-29 17:44 ` redi at gcc dot gnu.org
` (8 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: redi at gcc dot gnu.org @ 2024-02-28 9:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114103
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |13.3
Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org
Status|NEW |ASSIGNED
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug libstdc++/114103] FAIL: 29_atomics/atomic/lock_free_aliases.cc -std=gnu++20 (test for excess errors)
2024-02-25 17:47 [Bug libstdc++/114103] New: FAIL: 29_atomics/atomic/lock_free_aliases.cc -std=gnu++20 (test for excess errors) danglin at gcc dot gnu.org
` (9 preceding siblings ...)
2024-02-28 9:31 ` redi at gcc dot gnu.org
@ 2024-02-29 17:44 ` redi at gcc dot gnu.org
2024-03-01 22:15 ` dave.anglin at bell dot net
` (7 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: redi at gcc dot gnu.org @ 2024-02-29 17:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114103
--- Comment #10 from Jonathan Wakely <redi at gcc dot gnu.org> ---
This additional change should fix that:
--- a/libstdc++-v3/src/c++20/tzdb.cc
+++ b/libstdc++-v3/src/c++20/tzdb.cc
@@ -643,6 +643,7 @@ namespace std::chrono
void unlock() { infos_mutex.unlock(); }
};
+#if __cpp_lib_atomic_lock_free_type_aliases
#if defined __GTHREADS && __cpp_lib_atomic_wait
// Atomic count of unexpanded ZoneInfo objects in the infos vector.
// Concurrent access is allowed when all objects have been expanded.
@@ -704,6 +705,7 @@ namespace std::chrono
#endif // __GTHREADS && __cpp_lib_atomic_wait
RulesCounter<atomic_signed_lock_free> rules_counter;
+#endif // __cpp_lib_atomic_lock_free_type_aliases
#else // TZDB_DISABLED
_Impl(weak_ptr<tzdb_list::_Node>) { }
struct {
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug libstdc++/114103] FAIL: 29_atomics/atomic/lock_free_aliases.cc -std=gnu++20 (test for excess errors)
2024-02-25 17:47 [Bug libstdc++/114103] New: FAIL: 29_atomics/atomic/lock_free_aliases.cc -std=gnu++20 (test for excess errors) danglin at gcc dot gnu.org
` (10 preceding siblings ...)
2024-02-29 17:44 ` redi at gcc dot gnu.org
@ 2024-03-01 22:15 ` dave.anglin at bell dot net
2024-03-01 22:35 ` redi at gcc dot gnu.org
` (6 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: dave.anglin at bell dot net @ 2024-03-01 22:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114103
--- Comment #11 from dave.anglin at bell dot net ---
On 2024-02-29 12:44 p.m., redi at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114103
>
> --- Comment #10 from Jonathan Wakely <redi at gcc dot gnu.org> ---
> This additional change should fix that:
>
> --- a/libstdc++-v3/src/c++20/tzdb.cc
> +++ b/libstdc++-v3/src/c++20/tzdb.cc
> @@ -643,6 +643,7 @@ namespace std::chrono
> void unlock() { infos_mutex.unlock(); }
> };
>
> +#if __cpp_lib_atomic_lock_free_type_aliases
> #if defined __GTHREADS && __cpp_lib_atomic_wait
> // Atomic count of unexpanded ZoneInfo objects in the infos vector.
> // Concurrent access is allowed when all objects have been expanded.
> @@ -704,6 +705,7 @@ namespace std::chrono
> #endif // __GTHREADS && __cpp_lib_atomic_wait
>
> RulesCounter<atomic_signed_lock_free> rules_counter;
> +#endif // __cpp_lib_atomic_lock_free_type_aliases
> #else // TZDB_DISABLED
> _Impl(weak_ptr<tzdb_list::_Node>) { }
> struct {
Now we get:
libtool: compile: /home/dave/gnu/gcc/objdir64/./gcc/xgcc -shared-libgcc
-B/home/dave/gnu/gcc/objdir64/./gcc -nostdinc++
-L/home/dave/gnu/gcc/objdir64/hppa64-hp-hpux11.11/libstdc++-v3/src
-L/home/dave/gnu/gcc/objdir64/hppa64-hp-hpux11.11/libstdc++-v3/src/.libs
-L/home/dave/gnu/gcc/objdir64/hppa64-hp-hpux11.11/libstdc++-v3/libsupc++/.libs
-B/opt/gnu64/gcc/gcc-14/hppa64-hp-hpux11.11/bin/
-B/opt/gnu64/gcc/gcc-14/hppa64-hp-hpux11.11/lib/ -isystem
/opt/gnu64/gcc/gcc-14/hppa64-hp-hpux11.11/include -isystem
/opt/gnu64/gcc/gcc-14/hppa64-hp-hpux11.11/sys-include -fno-checking
-I/home/dave/gnu/gcc/gcc/libstdc++-v3/../libgcc
-I/home/dave/gnu/gcc/objdir64/hppa64-hp-hpux11.11/libstdc++-v3/include/hppa64-hp-hpux11.11
-I/home/dave/gnu/gcc/objdir64/hppa64-hp-hpux11.11/libstdc++-v3/include
-I/home/dave/gnu/gcc/gcc/libstdc++-v3/libsupc++ -std=gnu++20
-D_GLIBCXX_SHARED -fno-implicit-templates -Wall -Wextra -Wwrite-strings
-Wcast-qual -Wabi=2 -fdiagnostics-show-location=once -ffunction-sections
-fdata-sections -frandom-seed=tzdb.lo -fimplicit-templates -O2 -g -I. -c
../../../../../gcc/libstdc++-v3/src/c++20/tzdb.cc -DPIC
-D_GLIBCXX_SHARED -o tzdb.o
../../../../../gcc/libstdc++-v3/src/c++20/tzdb.cc: In member function
'std::chrono::sys_info
std::chrono::time_zone::_M_get_sys_info(std::chrono::sys_seconds) const':
../../../../../gcc/libstdc++-v3/src/c++20/tzdb.cc:781:30: error: 'struct
std::chrono::time_zone::_Impl' has no member named 'rules_counter'; did
you mean 'RulesCounter'?
781 | lock_guard lock(_M_impl->rules_counter);
| ^~~~~~~~~~~~~
| RulesCounter
../../../../../gcc/libstdc++-v3/src/c++20/tzdb.cc:971:18: error: 'struct
std::chrono::time_zone::_Impl' has no member named 'rules_counter'; did
you mean 'RulesCounter'?
971 | _M_impl->rules_counter.decrement();
| ^~~~~~~~~~~~~
| RulesCounter
../../../../../gcc/libstdc++-v3/src/c++20/tzdb.cc: In function 'const
std::chrono::tzdb& std::chrono::reload_tzdb()':
../../../../../gcc/libstdc++-v3/src/c++20/tzdb.cc:1490:24: error: 'struct
std::chrono::time_zone::_Impl' has no member named 'rules_counter';
did you mean 'RulesCounter'?
1490 | impl.rules_counter.increment();
| ^~~~~~~~~~~~~
| RulesCounter
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug libstdc++/114103] FAIL: 29_atomics/atomic/lock_free_aliases.cc -std=gnu++20 (test for excess errors)
2024-02-25 17:47 [Bug libstdc++/114103] New: FAIL: 29_atomics/atomic/lock_free_aliases.cc -std=gnu++20 (test for excess errors) danglin at gcc dot gnu.org
` (11 preceding siblings ...)
2024-03-01 22:15 ` dave.anglin at bell dot net
@ 2024-03-01 22:35 ` redi at gcc dot gnu.org
2024-03-01 22:38 ` redi at gcc dot gnu.org
` (5 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: redi at gcc dot gnu.org @ 2024-03-01 22:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114103
--- Comment #12 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Ah yes, it still needs some rules_counter, just not using the lock-free alias:
--- a/libstdc++-v3/src/c++20/tzdb.cc
+++ b/libstdc++-v3/src/c++20/tzdb.cc
@@ -705,6 +705,8 @@ namespace std::chrono
#endif // __GTHREADS && __cpp_lib_atomic_wait
RulesCounter<atomic_signed_lock_free> rules_counter;
+#else
+ RulesCounter<void> rules_counter;
#endif // __cpp_lib_atomic_lock_free_type_aliases
#else // TZDB_DISABLED
_Impl(weak_ptr<tzdb_list::_Node>) { }
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug libstdc++/114103] FAIL: 29_atomics/atomic/lock_free_aliases.cc -std=gnu++20 (test for excess errors)
2024-02-25 17:47 [Bug libstdc++/114103] New: FAIL: 29_atomics/atomic/lock_free_aliases.cc -std=gnu++20 (test for excess errors) danglin at gcc dot gnu.org
` (12 preceding siblings ...)
2024-03-01 22:35 ` redi at gcc dot gnu.org
@ 2024-03-01 22:38 ` redi at gcc dot gnu.org
2024-03-01 22:42 ` redi at gcc dot gnu.org
` (4 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: redi at gcc dot gnu.org @ 2024-03-01 22:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114103
--- Comment #13 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Ah yes, it still needs some rules_counter, just not using the lock-free alias:
--- a/libstdc++-v3/src/c++20/tzdb.cc
+++ b/libstdc++-v3/src/c++20/tzdb.cc
@@ -705,6 +705,8 @@ namespace std::chrono
#endif // __GTHREADS && __cpp_lib_atomic_wait
RulesCounter<atomic_signed_lock_free> rules_counter;
+#else
+ RulesCounter<void> rules_counter;
#endif // __cpp_lib_atomic_lock_free_type_aliases
#else // TZDB_DISABLED
_Impl(weak_ptr<tzdb_list::_Node>) { }
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug libstdc++/114103] FAIL: 29_atomics/atomic/lock_free_aliases.cc -std=gnu++20 (test for excess errors)
2024-02-25 17:47 [Bug libstdc++/114103] New: FAIL: 29_atomics/atomic/lock_free_aliases.cc -std=gnu++20 (test for excess errors) danglin at gcc dot gnu.org
` (13 preceding siblings ...)
2024-03-01 22:38 ` redi at gcc dot gnu.org
@ 2024-03-01 22:42 ` redi at gcc dot gnu.org
2024-03-02 23:36 ` dave.anglin at bell dot net
` (3 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: redi at gcc dot gnu.org @ 2024-03-01 22:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114103
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #57540|0 |1
is obsolete| |
--- Comment #14 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Created attachment 57591
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57591&action=edit
Do not define lock-free atomic aliases if not fully lock-free
Here's all of that as a single (slightly cleaned up) patch.
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug libstdc++/114103] FAIL: 29_atomics/atomic/lock_free_aliases.cc -std=gnu++20 (test for excess errors)
2024-02-25 17:47 [Bug libstdc++/114103] New: FAIL: 29_atomics/atomic/lock_free_aliases.cc -std=gnu++20 (test for excess errors) danglin at gcc dot gnu.org
` (14 preceding siblings ...)
2024-03-01 22:42 ` redi at gcc dot gnu.org
@ 2024-03-02 23:36 ` dave.anglin at bell dot net
2024-03-07 21:00 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: dave.anglin at bell dot net @ 2024-03-02 23:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114103
--- Comment #15 from dave.anglin at bell dot net ---
On 2024-03-01 5:42 p.m., redi at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114103
>
> Jonathan Wakely <redi at gcc dot gnu.org> changed:
>
> What |Removed |Added
> ----------------------------------------------------------------------------
> Attachment #57540|0 |1
> is obsolete| |
>
> --- Comment #14 from Jonathan Wakely <redi at gcc dot gnu.org> ---
> Created attachment 57591
> --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57591&action=edit
> Do not define lock-free atomic aliases if not fully lock-free
>
> Here's all of that as a single (slightly cleaned up) patch.
>
With this change, lock_free_aliases.cc fails test for excess errors:
Excess errors:
/home/dave/gnu/gcc/gcc/libstdc++-v3/testsuite/29_atomics/atomic/lock_free_aliases.cc:7:
error: #error "Feature test macro for lock-free type
aliases is missing in <atomic>"
/home/dave/gnu/gcc/gcc/libstdc++-v3/testsuite/29_atomics/atomic/lock_free_aliases.cc:19:
error: 'atomic_signed_lock_free' is not a member of 'std'
/home/dave/gnu/gcc/gcc/libstdc++-v3/testsuite/29_atomics/atomic/lock_free_aliases.cc:19:
error: template argument 1 is invalid
/home/dave/gnu/gcc/gcc/libstdc++-v3/testsuite/29_atomics/atomic/lock_free_aliases.cc:20:
error: 'atomic_unsigned_lock_free' is not a member of 'std'
/home/dave/gnu/gcc/gcc/libstdc++-v3/testsuite/29_atomics/atomic/lock_free_aliases.cc:20:
error: template argument 1 is invalid
/home/dave/gnu/gcc/gcc/libstdc++-v3/testsuite/29_atomics/atomic/lock_free_aliases.cc:25:
error: 'atomic_signed_lock_free' is not a member of 'std'
/home/dave/gnu/gcc/gcc/libstdc++-v3/testsuite/29_atomics/atomic/lock_free_aliases.cc:25:
error: template argument 1 is invalid
/home/dave/gnu/gcc/gcc/libstdc++-v3/testsuite/29_atomics/atomic/lock_free_aliases.cc:26:
error: 'atomic_unsigned_lock_free' is not a member of 'std'
/home/dave/gnu/gcc/gcc/libstdc++-v3/testsuite/29_atomics/atomic/lock_free_aliases.cc:26:
error: template argument 1 is invalid
/home/dave/gnu/gcc/gcc/libstdc++-v3/testsuite/29_atomics/atomic/lock_free_aliases.cc:29:
error: 'atomic_signed_lock_free' is not a member of 'std'
/home/dave/gnu/gcc/gcc/libstdc++-v3/testsuite/29_atomics/atomic/lock_free_aliases.cc:29:
error: template argument 1 is invalid
/home/dave/gnu/gcc/gcc/libstdc++-v3/testsuite/29_atomics/atomic/lock_free_aliases.cc:30:
error: 'atomic_unsigned_lock_free' is not a member of 'std'
/home/dave/gnu/gcc/gcc/libstdc++-v3/testsuite/29_atomics/atomic/lock_free_aliases.cc:30:
error: template argument 1 is invalid
/home/dave/gnu/gcc/gcc/libstdc++-v3/testsuite/29_atomics/atomic/lock_free_aliases.cc:33:
error: 'std::atomic_signed_lock_free' has not been declared
/home/dave/gnu/gcc/gcc/libstdc++-v3/testsuite/29_atomics/atomic/lock_free_aliases.cc:34:
error: 'std::atomic_unsigned_lock_free' has not been
declared
This is with my posted cmath patch.
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug libstdc++/114103] FAIL: 29_atomics/atomic/lock_free_aliases.cc -std=gnu++20 (test for excess errors)
2024-02-25 17:47 [Bug libstdc++/114103] New: FAIL: 29_atomics/atomic/lock_free_aliases.cc -std=gnu++20 (test for excess errors) danglin at gcc dot gnu.org
` (15 preceding siblings ...)
2024-03-02 23:36 ` dave.anglin at bell dot net
@ 2024-03-07 21:00 ` cvs-commit at gcc dot gnu.org
2024-03-07 21:01 ` redi at gcc dot gnu.org
2024-03-23 18:12 ` danglin at gcc dot gnu.org
18 siblings, 0 replies; 20+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-03-07 21:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114103
--- Comment #16 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>:
https://gcc.gnu.org/g:e162b2ff52c5e20f6624ff6b66845fe573cef183
commit r14-9371-ge162b2ff52c5e20f6624ff6b66845fe573cef183
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Mon Feb 26 13:17:32 2024 +0000
libstdc++: Do not define lock-free atomic aliases if not fully lock-free
[PR114103]
The whole point of these typedefs is to guarantee lock-freedom, so if
the target has no such types, we shouldn't defined the typedefs at all.
libstdc++-v3/ChangeLog:
PR libstdc++/114103
* include/bits/version.def (atomic_lock_free_type_aliases): Add
extra_cond to check for at least one always-lock-free type.
* include/bits/version.h: Regenerate.
* include/std/atomic (atomic_signed_lock_free)
(atomic_unsigned_lock_free): Only use always-lock-free types.
* src/c++20/tzdb.cc (time_zone::_Impl::RulesCounter): Don't use
atomic counter if lock-free aliases aren't available.
* testsuite/29_atomics/atomic/lock_free_aliases.cc: XFAIL for
targets without lock-free word-size compare_exchange.
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug libstdc++/114103] FAIL: 29_atomics/atomic/lock_free_aliases.cc -std=gnu++20 (test for excess errors)
2024-02-25 17:47 [Bug libstdc++/114103] New: FAIL: 29_atomics/atomic/lock_free_aliases.cc -std=gnu++20 (test for excess errors) danglin at gcc dot gnu.org
` (16 preceding siblings ...)
2024-03-07 21:00 ` cvs-commit at gcc dot gnu.org
@ 2024-03-07 21:01 ` redi at gcc dot gnu.org
2024-03-23 18:12 ` danglin at gcc dot gnu.org
18 siblings, 0 replies; 20+ messages in thread
From: redi at gcc dot gnu.org @ 2024-03-07 21:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114103
--- Comment #17 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I think this should be fixed now.
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug libstdc++/114103] FAIL: 29_atomics/atomic/lock_free_aliases.cc -std=gnu++20 (test for excess errors)
2024-02-25 17:47 [Bug libstdc++/114103] New: FAIL: 29_atomics/atomic/lock_free_aliases.cc -std=gnu++20 (test for excess errors) danglin at gcc dot gnu.org
` (17 preceding siblings ...)
2024-03-07 21:01 ` redi at gcc dot gnu.org
@ 2024-03-23 18:12 ` danglin at gcc dot gnu.org
18 siblings, 0 replies; 20+ messages in thread
From: danglin at gcc dot gnu.org @ 2024-03-23 18:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114103
John David Anglin <danglin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #18 from John David Anglin <danglin at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2024-03-23 18:12 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-25 17:47 [Bug libstdc++/114103] New: FAIL: 29_atomics/atomic/lock_free_aliases.cc -std=gnu++20 (test for excess errors) danglin at gcc dot gnu.org
2024-02-26 10:54 ` [Bug libstdc++/114103] " redi at gcc dot gnu.org
2024-02-26 10:55 ` redi at gcc dot gnu.org
2024-02-26 10:56 ` redi at gcc dot gnu.org
2024-02-26 12:21 ` dave.anglin at bell dot net
2024-02-26 12:22 ` redi at gcc dot gnu.org
2024-02-26 12:25 ` dave.anglin at bell dot net
2024-02-27 14:32 ` redi at gcc dot gnu.org
2024-02-27 20:49 ` dave.anglin at bell dot net
2024-02-28 1:04 ` dave.anglin at bell dot net
2024-02-28 9:31 ` redi at gcc dot gnu.org
2024-02-29 17:44 ` redi at gcc dot gnu.org
2024-03-01 22:15 ` dave.anglin at bell dot net
2024-03-01 22:35 ` redi at gcc dot gnu.org
2024-03-01 22:38 ` redi at gcc dot gnu.org
2024-03-01 22:42 ` redi at gcc dot gnu.org
2024-03-02 23:36 ` dave.anglin at bell dot net
2024-03-07 21:00 ` cvs-commit at gcc dot gnu.org
2024-03-07 21:01 ` redi at gcc dot gnu.org
2024-03-23 18:12 ` danglin at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).