public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/70889] memory reordering across loads tagged as memory_order_seq_cst
[not found] <bug-70889-4@http.gcc.gnu.org/bugzilla/>
@ 2021-08-22 19:42 ` pinskia at gcc dot gnu.org
2021-08-22 20:04 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-22 19:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70889
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Testcase:
#include <atomic>
#include <iostream>
std::atomic<std::size_t> seq_;
std::size_t value;
auto load()
{
std::size_t copy;
std::size_t seq0;
do
{
seq0 = seq_.load();
if (!seq0) continue;
copy = value;
seq0 = seq_.load();
} while (!seq0);
return copy;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug rtl-optimization/70889] memory reordering across loads tagged as memory_order_seq_cst
[not found] <bug-70889-4@http.gcc.gnu.org/bugzilla/>
2021-08-22 19:42 ` [Bug rtl-optimization/70889] memory reordering across loads tagged as memory_order_seq_cst pinskia at gcc dot gnu.org
@ 2021-08-22 20:04 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-22 20:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70889
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Dup of bug 57448 which is fixed in GCC 8.
*** This bug has been marked as a duplicate of bug 57448 ***
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-08-22 20:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-70889-4@http.gcc.gnu.org/bugzilla/>
2021-08-22 19:42 ` [Bug rtl-optimization/70889] memory reordering across loads tagged as memory_order_seq_cst pinskia at gcc dot gnu.org
2021-08-22 20:04 ` pinskia 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).