From f446f65340d41d6b4558a26912ba15e28059fe48 Mon Sep 17 00:00:00 2001 From: Teddy Date: Sun, 6 Apr 2014 10:26:37 +0800 Subject: complex cast almost done --- testcases/cast.c | 3 +++ testcases/cast2.c | 3 +++ testcases/cast3.c | 3 +++ testcases/fail10.c | 4 ++++ testcases/fail11.c | 4 ++++ testcases/fail8.c | 5 +++++ testcases/localfunc.c | 4 ++++ 7 files changed, 26 insertions(+) create mode 100644 testcases/cast.c create mode 100644 testcases/cast2.c create mode 100644 testcases/cast3.c create mode 100644 testcases/fail10.c create mode 100644 testcases/fail11.c create mode 100644 testcases/fail8.c create mode 100644 testcases/localfunc.c (limited to 'testcases') diff --git a/testcases/cast.c b/testcases/cast.c new file mode 100644 index 0000000..b441552 --- /dev/null +++ b/testcases/cast.c @@ -0,0 +1,3 @@ +int main() { + ((int (*)(int a))1)(1); +} diff --git a/testcases/cast2.c b/testcases/cast2.c new file mode 100644 index 0000000..34b3484 --- /dev/null +++ b/testcases/cast2.c @@ -0,0 +1,3 @@ +int main() { + (int [3])1; +} diff --git a/testcases/cast3.c b/testcases/cast3.c new file mode 100644 index 0000000..4500cb1 --- /dev/null +++ b/testcases/cast3.c @@ -0,0 +1,3 @@ +int main() { + (int ())1; +} diff --git a/testcases/fail10.c b/testcases/fail10.c new file mode 100644 index 0000000..e287c6f --- /dev/null +++ b/testcases/fail10.c @@ -0,0 +1,4 @@ +int main() { + int a[2][3]; + a[1][3][3] = 3; +} diff --git a/testcases/fail11.c b/testcases/fail11.c new file mode 100644 index 0000000..4aa213a --- /dev/null +++ b/testcases/fail11.c @@ -0,0 +1,4 @@ +int main() { + int a[2][3]; + a[1] = 3; +} diff --git a/testcases/fail8.c b/testcases/fail8.c new file mode 100644 index 0000000..21efd5f --- /dev/null +++ b/testcases/fail8.c @@ -0,0 +1,5 @@ +struct { + int f(); +}; +int main() { +} diff --git a/testcases/localfunc.c b/testcases/localfunc.c new file mode 100644 index 0000000..8012c6f --- /dev/null +++ b/testcases/localfunc.c @@ -0,0 +1,4 @@ +int f(int a); +int main() { + int f(int a, int b); +} -- cgit v1.2.3-70-g09d2