* gcc.dg/c99-restrict-2.c: New test.
authorJoseph Myers <jsm@polyomino.org.uk>
Fri, 24 Oct 2003 12:00:25 +0000 (13:00 +0100)
committerJoseph Myers <jsm28@gcc.gnu.org>
Fri, 24 Oct 2003 12:00:25 +0000 (13:00 +0100)
From-SVN: r72889

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/c99-restrict-2.c [new file with mode: 0644]

index 26eec79ce031be734660565eeb960965d8515d15..720df2382d54d1b65118a0b4906e23bb00eab26b 100644 (file)
@@ -1,3 +1,7 @@
+2003-10-24  Joseph S. Myers  <jsm@polyomino.org.uk>
+
+       * gcc.dg/c99-restrict-2.c: New test.
+
 2003-10-24  Nathan Sidwell  <nathan@codesourcery.com>
 
        PR c++/12698, c++/12699, c++/12700, c++/12566
diff --git a/gcc/testsuite/gcc.dg/c99-restrict-2.c b/gcc/testsuite/gcc.dg/c99-restrict-2.c
new file mode 100644 (file)
index 0000000..2adc5f2
--- /dev/null
@@ -0,0 +1,12 @@
+/* Test for restrict: in C99 only.  Test handling of arrays of restricted
+   pointers.  */
+/* Origin: Joseph Myers <jsm@polyomino.org.uk> */
+/* { dg-do compile } */
+/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
+
+typedef int *ipa[2];
+
+int *restrict x[2];
+restrict ipa y;
+
+void f(int *restrict a[2], restrict ipa b, int *restrict c[restrict]);