]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/c-c++-common/pr83059.c
Eenable -Winvalid-memory-order for C++ [PR99612].
[thirdparty/gcc.git] / gcc / testsuite / c-c++-common / pr83059.c
CommitLineData
5a431b60 1/* PR c++/83059 - ICE on invalid C++ code: in tree_to_uhwi, at tree.c:6633 */
d44ed508
JJ
2/* { dg-do compile } */
3
4void
5foo (int *p, int *q, int *r)
6{
7 __atomic_compare_exchange (p, q, r, 0, 0, -1); /* { dg-warning "invalid memory model argument 6" } */
d44ed508 8}
5a431b60
MS
9
10/* The test triggers several distinct instance of the warning. Prune
11 them out; they're not relevant to its main purpose -- to verify
12 there's no ICE.
13 { dg-prune-output "-Winvalid-memory-model" } */