This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/81316] New: Missing memory side effect on __atomic_store
- From: "mfcc64 at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 04 Jul 2017 19:34:44 +0000
- Subject: [Bug target/81316] New: Missing memory side effect on __atomic_store
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81316
Bug ID: 81316
Summary: Missing memory side effect on __atomic_store
Product: gcc
Version: 6.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: mfcc64 at gmail dot com
Target Milestone: ---
Created attachment 41679
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41679&action=edit
Testcase
Missing memory side effect on __atomic_store using __ATOMIC_RELEASE.
How to reproduce (atomic-fail.c attached):
gcc atomic-fail.c -O2 -pthread -o atomic-fail
./atomic-fail
Error: val != 1, missing memory side effect.
The bug is not reproduced with __atomic_store using __ATOMIC_SEQ_CST. Probably
this is similar to Bug80640.