+2015-01-14 Andrew MacLeod <amacleod@redhat.com>
+
+ PR middle-end/59448
+ * builtins.c (get_memmodel): Promote consume to acquire always.
+
2014-01-14 Ilya Tocar <ilya.tocar@intel.com>
PR target/64386
return MEMMODEL_SEQ_CST;
}
+ /* Workaround for Bugzilla 59448. GCC doesn't track consume properly, so
+ be conservative and promote consume to acquire. */
+ if (val == MEMMODEL_CONSUME)
+ val = MEMMODEL_ACQUIRE;
+
return (enum memmodel) val;
}
+2015-01-14 Andrew MacLeod <amacleod@redhat.com>
+
+ PR middle-end/59448
+ * gcc.dg/atomic-invalid.c: Remove obselete test for illegal consume in
+ an atomic_exchange.
+
2014-01-14 Ilya Tocar <ilya.tocar@intel.com>
PR target/64386
__atomic_compare_exchange_n (&i, &e, 1, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELEASE); /* { dg-error "invalid failure memory" } */
__atomic_compare_exchange_n (&i, &e, 1, 1, __ATOMIC_SEQ_CST, __ATOMIC_ACQ_REL); /* { dg-error "invalid failure memory" } */
- __atomic_exchange_n (&i, 1, __ATOMIC_CONSUME); /* { dg-error "invalid memory model" } */
-
__atomic_load_n (&i, __ATOMIC_RELEASE); /* { dg-error "invalid memory model" } */
__atomic_load_n (&i, __ATOMIC_ACQ_REL); /* { dg-error "invalid memory model" } */