This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
New testcase for bug in restrict handling
- From: "Joseph S. Myers" <jsm at polyomino dot org dot uk>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 24 Oct 2003 13:03:08 +0100 (BST)
- Subject: New testcase for bug in restrict handling
This patch adds a testcase for a bug in C99 restrict handling that was
probably fixed by
<http://gcc.gnu.org/ml/gcc-patches/2003-10/msg00693.html>. Applied to
mainline.
2003-10-24 Joseph S. Myers <jsm@polyomino.org.uk>
* gcc.dg/c99-restrict-2.c: New test.
--- /dev/null 2002-08-26 16:21:36.000000000 +0000
+++ c99-restrict-2.c 2003-10-24 08:51:05.000000000 +0000
@@ -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]);
--
Joseph S. Myers
jsm@polyomino.org.uk