gcc/testsuite/c-c++-common/pr83059.c
raw| 1 | /* PR c++/83059 - ICE on invalid C++ code: in tree_to_uhwi, at tree.c:6633 */ |
| 2 | /* { dg-do compile } */ |
| 3 | |
| 4 | void |
| 5 | foo (int *p, int *q, int *r) |
| 6 | { |
| 7 | __atomic_compare_exchange (p, q, r, 0, 0, -1); /* { dg-warning "invalid memory model argument 6" } */ |
| 8 | } |
| 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" } */ |