This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]