aboutsummaryrefslogtreecommitdiff
path: root/test/func-param-scope.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/func-param-scope.c')
-rw-r--r--test/func-param-scope.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/func-param-scope.c b/test/func-param-scope.c
new file mode 100644
index 0000000..f5e51f3
--- /dev/null
+++ b/test/func-param-scope.c
@@ -0,0 +1,9 @@
+enum {A = 1};
+char (*f(enum {A = 2} *p, int (*a)[A], double (*b)[sizeof **a]))[A] {
+ static_assert(A == 2);
+ static_assert(sizeof *b == sizeof(int) * sizeof(double));
+ static_assert(sizeof *a == 2 * sizeof(int));
+ return 0;
+}
+static_assert(A == 1);
+static_assert(sizeof *f(0, 0, 0) == 1);