aboutsummaryrefslogtreecommitdiff
path: root/testcases
diff options
context:
space:
mode:
Diffstat (limited to 'testcases')
-rw-r--r--testcases/global_decl.c3
-rw-r--r--testcases/incomp_initr.c4
-rw-r--r--testcases/param1.c5
-rw-r--r--testcases/param2.c4
-rw-r--r--testcases/param3.c4
-rw-r--r--testcases/pass.c2
6 files changed, 22 insertions, 0 deletions
diff --git a/testcases/global_decl.c b/testcases/global_decl.c
new file mode 100644
index 0000000..ff49829
--- /dev/null
+++ b/testcases/global_decl.c
@@ -0,0 +1,3 @@
+int x = x;
+int main() {
+}
diff --git a/testcases/incomp_initr.c b/testcases/incomp_initr.c
new file mode 100644
index 0000000..1068284
--- /dev/null
+++ b/testcases/incomp_initr.c
@@ -0,0 +1,4 @@
+int main() {
+ struct A {int x, y;} b;
+ int a[(1 + 1 == 2) * 2] = {1, b};
+}
diff --git a/testcases/param1.c b/testcases/param1.c
new file mode 100644
index 0000000..6c22a2b
--- /dev/null
+++ b/testcases/param1.c
@@ -0,0 +1,5 @@
+int f();
+int f() {}
+int main() {
+ f(1, 2, 3);
+}
diff --git a/testcases/param2.c b/testcases/param2.c
new file mode 100644
index 0000000..6b1726d
--- /dev/null
+++ b/testcases/param2.c
@@ -0,0 +1,4 @@
+int f();
+int f(int a) {}
+int main() {
+}
diff --git a/testcases/param3.c b/testcases/param3.c
new file mode 100644
index 0000000..8492455
--- /dev/null
+++ b/testcases/param3.c
@@ -0,0 +1,4 @@
+int f(int a);
+int f() {}
+int main() {
+}
diff --git a/testcases/pass.c b/testcases/pass.c
index e489366..a1d3705 100644
--- a/testcases/pass.c
+++ b/testcases/pass.c
@@ -98,6 +98,8 @@ void local_decl() {
int y = y;
{
int x = x;
+ int a;
+ int b = a = 2;
}
}