aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/external/c-testsuite/tests/single-exec/00162.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2025-12-13 19:21:04 +0100
committerlemon <lsof@mailbox.org>2025-12-13 19:21:04 +0100
commite51ac7ec7d3e32e1771c9f824da3dc7e4dcd2bc5 (patch)
treea0b7a0c29247374b96fdbfb29bc365d15e9e36a5 /test/external/c-testsuite/tests/single-exec/00162.c
parent6c7cdc537b7b341f9ca25a3e8b61de46c99840e7 (diff)
add c-testsuite
Diffstat (limited to 'test/external/c-testsuite/tests/single-exec/00162.c')
-rw-r--r--test/external/c-testsuite/tests/single-exec/00162.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/test/external/c-testsuite/tests/single-exec/00162.c b/test/external/c-testsuite/tests/single-exec/00162.c
new file mode 100644
index 0000000..46950aa
--- /dev/null
+++ b/test/external/c-testsuite/tests/single-exec/00162.c
@@ -0,0 +1,34 @@
+void foo(int [5]);
+void fooc(int x[const 5]);
+void foos(int x[static 5]);
+void foov(int x[volatile 5]);
+void foor(int x[restrict 5]);
+void fooc(int [const 5]);
+void foos(int [static 5]);
+void foov(int [volatile 5]);
+void foor(int [restrict 5]);
+void fooc(int (* const x));
+void foos(int *x);
+void foov(int * volatile x);
+void foor(int * restrict x);
+void fooc(int x[volatile 5])
+{
+ x[3] = 42;
+#ifdef INVALID
+ x = 0;
+#endif
+}
+void foovm(int x[const *]);
+void foovm(int * const x);
+#ifdef INVALID
+void wrongc(int x[3][const 4]);
+void wrongvm(int x[static *]);
+void foovm(int x[const *])
+{
+ x[2] = 1;
+}
+#endif
+int main()
+{
+ return 0;
+}