gcc/testsuite/c-c++-common/pr35503-2.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-fdiagnostics-show-caret -Wrestrict" } */ |
| 3 | |
| 4 | void f(int *__restrict x, int *y, int *__restrict z, int *w); |
| 5 | |
| 6 | void foo(int alpha, int beta) |
| 7 | { |
| 8 | f (&alpha, &beta, &alpha, &alpha); /* { dg-warning "passing argument 1 to 'restrict'-qualified parameter aliases with arguments 3, 4" } */ |
| 9 | |
| 10 | /* { dg-begin-multiline-output "" } |
| 11 | f (&alpha, &beta, &alpha, &alpha); |
| 12 | ^~~~~~ ~~~~~~ ~~~~~~ |
| 13 | { dg-end-multiline-output "" } */ |
| 14 | } |