This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/81316] Missing memory side effect on __atomic_store
- From: "amonakov at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 04 Sep 2017 10:17:08 +0000
- Subject: [Bug target/81316] Missing memory side effect on __atomic_store
- Auto-submitted: auto-generated
- References: <bug-81316-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81316
--- Comment #2 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
Author: amonakov
Date: Mon Sep 4 10:16:37 2017
New Revision: 251643
URL: https://gcc.gnu.org/viewcvs?rev=251643&root=gcc&view=rev
Log:
optabs: ensure atomic_load/stores have compiler barriers
PR rtl-optimization/57448
PR target/67458
PR target/81316
* optabs.c (expand_atomic_load): Place compiler memory barriers if
using atomic_load pattern.
(expand_atomic_store): Likewise.
testsuite/
* gcc.dg/atomic/pr80640-2.c: New testcase.
* gcc.dg/atomic/pr81316.c: New testcase.
Added:
trunk/gcc/testsuite/gcc.dg/atomic/pr80640-2.c
trunk/gcc/testsuite/gcc.dg/atomic/pr81316.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/optabs.c
trunk/gcc/testsuite/ChangeLog