aboutsummaryrefslogtreecommitdiff
path: root/testcases
diff options
context:
space:
mode:
Diffstat (limited to 'testcases')
-rw-r--r--testcases/anonymous_struct1.c6
-rw-r--r--testcases/anonymous_struct2.c7
-rw-r--r--testcases/array_complete.c4
-rw-r--r--testcases/array_decl.c6
-rw-r--r--testcases/array_decl2.c7
-rw-r--r--testcases/cast.c3
-rw-r--r--testcases/cast2.c3
-rw-r--r--testcases/cast3.c3
-rw-r--r--testcases/conflict.c4
-rw-r--r--testcases/decl_comp.c5
-rw-r--r--testcases/decl_comp2.c5
-rw-r--r--testcases/decl_comp3.c4
-rw-r--r--testcases/fail1.c2
-rw-r--r--testcases/fail10.c4
-rw-r--r--testcases/fail11.c4
-rw-r--r--testcases/fail2.c4
-rw-r--r--testcases/fail3.c4
-rw-r--r--testcases/fail4.c3
-rw-r--r--testcases/fail5.c4
-rw-r--r--testcases/fail6.c5
-rw-r--r--testcases/fail7.c6
-rw-r--r--testcases/fail8.c5
-rw-r--r--testcases/function_returns_function.c1
-rw-r--r--testcases/global_decl.c3
-rw-r--r--testcases/incomp_initr.c4
-rw-r--r--testcases/incomp_param.c5
-rw-r--r--testcases/local_struct.c7
-rw-r--r--testcases/param1.c5
-rw-r--r--testcases/param2.c4
-rw-r--r--testcases/param3.c4
-rw-r--r--testcases/pass.c147
-rw-r--r--testcases/ref.c4
-rw-r--r--testcases/sizeof.c3
-rw-r--r--testcases/typedef1.c4
-rw-r--r--testcases/typedef2.c4
-rw-r--r--testcases/typedef3.c4
-rw-r--r--testcases/typedef4.c10
-rw-r--r--testcases/void_decl.c3
-rw-r--r--testcases/void_decl2.c5
39 files changed, 0 insertions, 315 deletions
diff --git a/testcases/anonymous_struct1.c b/testcases/anonymous_struct1.c
deleted file mode 100644
index 2709f70..0000000
--- a/testcases/anonymous_struct1.c
+++ /dev/null
@@ -1,6 +0,0 @@
-int main() {
- struct {int x, y;} a, b, c;
- a = b;
- b = c;
- c = a;
-}
diff --git a/testcases/anonymous_struct2.c b/testcases/anonymous_struct2.c
deleted file mode 100644
index b17e6c0..0000000
--- a/testcases/anonymous_struct2.c
+++ /dev/null
@@ -1,7 +0,0 @@
-int main() {
- struct {int x, y;} a;
- struct {int x, y;} b, c;
- a = b;
- b = c;
- c = a;
-}
diff --git a/testcases/array_complete.c b/testcases/array_complete.c
deleted file mode 100644
index 79c5c8a..0000000
--- a/testcases/array_complete.c
+++ /dev/null
@@ -1,4 +0,0 @@
-struct A arr[1];
-struct A {int x;};
-int main() {
-}
diff --git a/testcases/array_decl.c b/testcases/array_decl.c
deleted file mode 100644
index 33973e5..0000000
--- a/testcases/array_decl.c
+++ /dev/null
@@ -1,6 +0,0 @@
-int f(int a[1][3][2]) {
-}
-int main() {
- int a[3][3][2];
- f(a);
-}
diff --git a/testcases/array_decl2.c b/testcases/array_decl2.c
deleted file mode 100644
index d7f8a04..0000000
--- a/testcases/array_decl2.c
+++ /dev/null
@@ -1,7 +0,0 @@
-int f(int a[20][2][2]);
-int f(int a[1][3][2]) {
-}
-int main() {
- int a[3][3][2];
- f(a);
-}
diff --git a/testcases/cast.c b/testcases/cast.c
deleted file mode 100644
index b441552..0000000
--- a/testcases/cast.c
+++ /dev/null
@@ -1,3 +0,0 @@
-int main() {
- ((int (*)(int a))1)(1);
-}
diff --git a/testcases/cast2.c b/testcases/cast2.c
deleted file mode 100644
index 34b3484..0000000
--- a/testcases/cast2.c
+++ /dev/null
@@ -1,3 +0,0 @@
-int main() {
- (int [3])1;
-}
diff --git a/testcases/cast3.c b/testcases/cast3.c
deleted file mode 100644
index 4500cb1..0000000
--- a/testcases/cast3.c
+++ /dev/null
@@ -1,3 +0,0 @@
-int main() {
- (int ())1;
-}
diff --git a/testcases/conflict.c b/testcases/conflict.c
deleted file mode 100644
index f2798e7..0000000
--- a/testcases/conflict.c
+++ /dev/null
@@ -1,4 +0,0 @@
-int f(int a, char b);
-int f(int a);
-int main() {
-}
diff --git a/testcases/decl_comp.c b/testcases/decl_comp.c
deleted file mode 100644
index f1b8bd2..0000000
--- a/testcases/decl_comp.c
+++ /dev/null
@@ -1,5 +0,0 @@
-int f();
-int f(int a);
-int main() {
- f(1, 2);
-}
diff --git a/testcases/decl_comp2.c b/testcases/decl_comp2.c
deleted file mode 100644
index f1298bd..0000000
--- a/testcases/decl_comp2.c
+++ /dev/null
@@ -1,5 +0,0 @@
-int f(int a);
-int f() {
-}
-int main() {
-}
diff --git a/testcases/decl_comp3.c b/testcases/decl_comp3.c
deleted file mode 100644
index 29d388f..0000000
--- a/testcases/decl_comp3.c
+++ /dev/null
@@ -1,4 +0,0 @@
-int f();
-int f(int a) {
- f();
-}
diff --git a/testcases/fail1.c b/testcases/fail1.c
deleted file mode 100644
index f80ecaa..0000000
--- a/testcases/fail1.c
+++ /dev/null
@@ -1,2 +0,0 @@
-int main(struct C c) { /* fail because of incomplete type of parameter */
-}
diff --git a/testcases/fail10.c b/testcases/fail10.c
deleted file mode 100644
index e287c6f..0000000
--- a/testcases/fail10.c
+++ /dev/null
@@ -1,4 +0,0 @@
-int main() {
- int a[2][3];
- a[1][3][3] = 3;
-}
diff --git a/testcases/fail11.c b/testcases/fail11.c
deleted file mode 100644
index 4aa213a..0000000
--- a/testcases/fail11.c
+++ /dev/null
@@ -1,4 +0,0 @@
-int main() {
- int a[2][3];
- a[1] = 3;
-}
diff --git a/testcases/fail2.c b/testcases/fail2.c
deleted file mode 100644
index a76d4e0..0000000
--- a/testcases/fail2.c
+++ /dev/null
@@ -1,4 +0,0 @@
-int main() {
- /* fail because of incomplete type of local variable */
- struct C c;
-}
diff --git a/testcases/fail3.c b/testcases/fail3.c
deleted file mode 100644
index ad47f5f..0000000
--- a/testcases/fail3.c
+++ /dev/null
@@ -1,4 +0,0 @@
-int main(int main) {
- /* fail because `f' is overrided by parameter */
- main(3);
-}
diff --git a/testcases/fail4.c b/testcases/fail4.c
deleted file mode 100644
index 20033af..0000000
--- a/testcases/fail4.c
+++ /dev/null
@@ -1,3 +0,0 @@
-int main() {
- (void)1 + 2; /* not ok */
-}
diff --git a/testcases/fail5.c b/testcases/fail5.c
deleted file mode 100644
index 0e8fba8..0000000
--- a/testcases/fail5.c
+++ /dev/null
@@ -1,4 +0,0 @@
-int main() {
- /* fail because of incomplete field */
- struct C {struct B b;} *c;
-}
diff --git a/testcases/fail6.c b/testcases/fail6.c
deleted file mode 100644
index 3419ce9..0000000
--- a/testcases/fail6.c
+++ /dev/null
@@ -1,5 +0,0 @@
-int main() {
- struct C {int x;} *c;
- /* fail because no member called `y' */
- c->y;
-}
diff --git a/testcases/fail7.c b/testcases/fail7.c
deleted file mode 100644
index 5040408..0000000
--- a/testcases/fail7.c
+++ /dev/null
@@ -1,6 +0,0 @@
-int *main(int a,int b) {
- struct {int x;} c;
- /* fail because of wrong argument type */
- main(2, c);
- return &a;
-}
diff --git a/testcases/fail8.c b/testcases/fail8.c
deleted file mode 100644
index 21efd5f..0000000
--- a/testcases/fail8.c
+++ /dev/null
@@ -1,5 +0,0 @@
-struct {
- int f();
-};
-int main() {
-}
diff --git a/testcases/function_returns_function.c b/testcases/function_returns_function.c
deleted file mode 100644
index e590ddb..0000000
--- a/testcases/function_returns_function.c
+++ /dev/null
@@ -1 +0,0 @@
-int main()() {}
diff --git a/testcases/global_decl.c b/testcases/global_decl.c
deleted file mode 100644
index ff49829..0000000
--- a/testcases/global_decl.c
+++ /dev/null
@@ -1,3 +0,0 @@
-int x = x;
-int main() {
-}
diff --git a/testcases/incomp_initr.c b/testcases/incomp_initr.c
deleted file mode 100644
index 1068284..0000000
--- a/testcases/incomp_initr.c
+++ /dev/null
@@ -1,4 +0,0 @@
-int main() {
- struct A {int x, y;} b;
- int a[(1 + 1 == 2) * 2] = {1, b};
-}
diff --git a/testcases/incomp_param.c b/testcases/incomp_param.c
deleted file mode 100644
index c1ece5f..0000000
--- a/testcases/incomp_param.c
+++ /dev/null
@@ -1,5 +0,0 @@
-int f(struct A a, int b) {
-
-}
-int main() {
-}
diff --git a/testcases/local_struct.c b/testcases/local_struct.c
deleted file mode 100644
index 28cb223..0000000
--- a/testcases/local_struct.c
+++ /dev/null
@@ -1,7 +0,0 @@
-struct A {int x; int y; } b;
-int f(struct A {int a;} p) {
- struct A a;
- a.x;
-}
-int main() {
-}
diff --git a/testcases/param1.c b/testcases/param1.c
deleted file mode 100644
index 6c22a2b..0000000
--- a/testcases/param1.c
+++ /dev/null
@@ -1,5 +0,0 @@
-int f();
-int f() {}
-int main() {
- f(1, 2, 3);
-}
diff --git a/testcases/param2.c b/testcases/param2.c
deleted file mode 100644
index 6b1726d..0000000
--- a/testcases/param2.c
+++ /dev/null
@@ -1,4 +0,0 @@
-int f();
-int f(int a) {}
-int main() {
-}
diff --git a/testcases/param3.c b/testcases/param3.c
deleted file mode 100644
index 8492455..0000000
--- a/testcases/param3.c
+++ /dev/null
@@ -1,4 +0,0 @@
-int f(int a);
-int f() {}
-int main() {
-}
diff --git a/testcases/pass.c b/testcases/pass.c
deleted file mode 100644
index a7d4481..0000000
--- a/testcases/pass.c
+++ /dev/null
@@ -1,147 +0,0 @@
-int;
-char;
-struct {int x;};
-/* useless declarations are ok */
-
-int a(int a);
-int a(int d);
-/* duplicate function declarations are ok */
-
-struct A {int x; int y;} b;
-
-/* struct definitions in parameters is in a local scope
- * subsequent parameter can make use of previous defined struct */
-
-int foo(struct A {int x;} a, struct A b) {
- /* function declaration in local scope is ok */
- int f(char *x);
- /* A is defined in parameters */
- struct A c;
- c.x = 43;
-}
-
-void bar() {
- /* struct definition is ok inside a function */
- struct A {int x;};
- struct A a;
- a.x = 1;
- {
- /* the following `A' is different from previous one */
- struct A {int y;};
- struct A b;
- b.y = 2;
- }
-}
-
-struct C c;
-struct C {
- struct D {
- int x, y;
- } b;
- int c;
- struct D d;
-};
-struct D d; /* feasible here */
-
-void nonsense() {
- char q;
- (void)q;
- return "yay";
-}
-
-int assign() {
- int *a;
- struct {int *x;} b;
- a = b.x;
-}
-
-void incomplete() {
- struct E {struct F *f;} e;
-}
-
-void delay() {
- struct G *g;
- struct G {int x; };
- g->x = 1;
-}
-
-void comma() {
- int a;
- int *b;
- (b++, a++) * 3;
-}
-
-int complex_pointer() {
- int (*g(int ***e[10]))();
-}
-
-int fp(int a, int b, int c) {
- int (*f)(int a, int b, int c);
- f = ****fp + 1;
- (****f)(1, 2, 3);
- f = &fp + 1;
-}
-
-int fc(int fc()) {
- fc(complex_pointer);
-}
-
-int incomp(struct I a);
-struct I { int i, j; };
-
-void (*bsd_signal(int sig, void (*func)(int a)))(int b);
-
-void array() {
- int a[(1 + 1 == 2) * 2];
-}
-
-void local_decl() {
- int y = y;
- {
- int x = x;
- int a;
- int b = a = 2;
- }
-}
-
-struct Node n;
-struct Node {int x, y;} n;
-/* global forward declaration is ok */
-int again;
-int again;
-
-typedef int def;
-int typedef1() {
- int def; /* overrides outer typedef */
- def = 1;
-}
-typedef int *ptr1;
-int typedef2() {
- typedef int **ptr2;
- {
- typedef int ***ptr3;
- ptr3 ptr2;
- ptr3 ptr1;
- }
-}
-
-typedef struct TA {
- int x;
-} TA;
-typedef struct TA TA;
-int typedef_struct() {
- TA a;
- a.x = 1;
-}
-
-struct AA {int x; int y; };
-int aa(struct AA {int a;} p) {
- struct AA a;
- a.a;
-}
-
-int main() {
- int self = sizeof self;
- n.x = 1;
- n.y = 2;
-}
diff --git a/testcases/ref.c b/testcases/ref.c
deleted file mode 100644
index 4644127..0000000
--- a/testcases/ref.c
+++ /dev/null
@@ -1,4 +0,0 @@
-int main() {
- int a, b;
- &(a + b);
-}
diff --git a/testcases/sizeof.c b/testcases/sizeof.c
deleted file mode 100644
index 4d0dceb..0000000
--- a/testcases/sizeof.c
+++ /dev/null
@@ -1,3 +0,0 @@
-int main() {
- int a[sizeof a];
-}
diff --git a/testcases/typedef1.c b/testcases/typedef1.c
deleted file mode 100644
index e67c112..0000000
--- a/testcases/typedef1.c
+++ /dev/null
@@ -1,4 +0,0 @@
-int main() {
- typedef int a;
- int a();
-}
diff --git a/testcases/typedef2.c b/testcases/typedef2.c
deleted file mode 100644
index be9f3a4..0000000
--- a/testcases/typedef2.c
+++ /dev/null
@@ -1,4 +0,0 @@
-int main() {
- typedef int a;
-}
-int a;
diff --git a/testcases/typedef3.c b/testcases/typedef3.c
deleted file mode 100644
index 71c45d1..0000000
--- a/testcases/typedef3.c
+++ /dev/null
@@ -1,4 +0,0 @@
-typedef int a;
-int main() {
-}
-int a;
diff --git a/testcases/typedef4.c b/testcases/typedef4.c
deleted file mode 100644
index 0aeb0f4..0000000
--- a/testcases/typedef4.c
+++ /dev/null
@@ -1,10 +0,0 @@
-typedef struct I I;
-int incomp(I a);
-struct I { int i, j; };
-int incomp(I a) {}
-typedef int b;
-int main() {
- I i;
- b b;
- incomp(i);
-}
diff --git a/testcases/void_decl.c b/testcases/void_decl.c
deleted file mode 100644
index 8a68b18..0000000
--- a/testcases/void_decl.c
+++ /dev/null
@@ -1,3 +0,0 @@
-void a;
-int main() {
-}
diff --git a/testcases/void_decl2.c b/testcases/void_decl2.c
deleted file mode 100644
index 30c7af6..0000000
--- a/testcases/void_decl2.c
+++ /dev/null
@@ -1,5 +0,0 @@
-struct {
- void a;
-};
-int main() {
-}