summaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/pr35503-3.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/c-c++-common/pr35503-3.c')
-rw-r--r--gcc/testsuite/c-c++-common/pr35503-3.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/c-c++-common/pr35503-3.c b/gcc/testsuite/c-c++-common/pr35503-3.c
new file mode 100644
index 00000000000..8cbacabba62
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr35503-3.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-Wrestrict" } */
+
+void f(int *x, int *__restrict y);
+
+void foo(int a)
+{
+ f (&a, &a); /* { dg-warning "passing argument 2 to restrict-qualified parameter aliases with argument 1" } */
+}