public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/108564] New: RISCV std::atomic<bool> needs libatomics
@ 2023-01-26 22:47 raj.khem at gmail dot com
  2023-01-26 22:48 ` [Bug target/108564] " pinskia at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: raj.khem at gmail dot com @ 2023-01-26 22:47 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108564

            Bug ID: 108564
           Summary: RISCV std::atomic<bool> needs libatomics
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: raj.khem at gmail dot com
  Target Milestone: ---

following test generates a call to __atomic_exchange_1 with gcc trunk ( soon to
be gcc 13 )  if I use std::atomic<int> that seems to not need libatomic but
std::atomic<bool> does need libatomic. Is that expected ?


#include <atomic>

std::atomic<bool> _closed;

void test(void) {
  _closed.exchange(true);
}

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug target/108564] RISCV std::atomic<bool> needs libatomics
  2023-01-26 22:47 [Bug c++/108564] New: RISCV std::atomic<bool> needs libatomics raj.khem at gmail dot com
@ 2023-01-26 22:48 ` pinskia at gcc dot gnu.org
  2023-01-26 22:50 ` pinskia at gcc dot gnu.org
  2023-01-26 22:50 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-01-26 22:48 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108564

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c++                         |target
      Known to fail|13.0                        |
             Target|riscv64-yoe-linux           |
               Host|x86_64                      |

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This is by design ...

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug target/108564] RISCV std::atomic<bool> needs libatomics
  2023-01-26 22:47 [Bug c++/108564] New: RISCV std::atomic<bool> needs libatomics raj.khem at gmail dot com
  2023-01-26 22:48 ` [Bug target/108564] " pinskia at gcc dot gnu.org
@ 2023-01-26 22:50 ` pinskia at gcc dot gnu.org
  2023-01-26 22:50 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-01-26 22:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108564

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
RISCV does not support subword atomics yet except via libatomic.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug target/108564] RISCV std::atomic<bool> needs libatomics
  2023-01-26 22:47 [Bug c++/108564] New: RISCV std::atomic<bool> needs libatomics raj.khem at gmail dot com
  2023-01-26 22:48 ` [Bug target/108564] " pinskia at gcc dot gnu.org
  2023-01-26 22:50 ` pinskia at gcc dot gnu.org
@ 2023-01-26 22:50 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-01-26 22:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108564

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Dup of bug 104338.

*** This bug has been marked as a duplicate of bug 104338 ***

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-01-26 22:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-26 22:47 [Bug c++/108564] New: RISCV std::atomic<bool> needs libatomics raj.khem at gmail dot com
2023-01-26 22:48 ` [Bug target/108564] " pinskia at gcc dot gnu.org
2023-01-26 22:50 ` pinskia at gcc dot gnu.org
2023-01-26 22:50 ` 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).