aboutsummaryrefslogtreecommitdiff
path: root/testcases
diff options
context:
space:
mode:
authorTeddy <[email protected]>2014-04-16 03:32:53 +0800
committerTeddy <[email protected]>2014-04-16 03:32:53 +0800
commit3c520b2038e749e545a98f6b77c52f74eedb0e40 (patch)
tree18ff0df9a934cc4ffde490c9bef0fb328aa9b24f /testcases
parentad83151b81584d15966d620a93430a723fee8200 (diff)
...
Diffstat (limited to 'testcases')
-rw-r--r--testcases/local_struct.c7
-rw-r--r--testcases/pass.c6
-rw-r--r--testcases/void_decl.c3
-rw-r--r--testcases/void_decl2.c5
4 files changed, 21 insertions, 0 deletions
diff --git a/testcases/local_struct.c b/testcases/local_struct.c
new file mode 100644
index 0000000..28cb223
--- /dev/null
+++ b/testcases/local_struct.c
@@ -0,0 +1,7 @@
+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/pass.c b/testcases/pass.c
index 9711611..5d5b3dc 100644
--- a/testcases/pass.c
+++ b/testcases/pass.c
@@ -134,6 +134,12 @@ int typedef_struct() {
a.x = 1;
}
+struct AA {int x; int y; };
+int aa(struct AA {int a;} p) {
+ struct AA a;
+ a.a;
+}
+
int main() {
n.x = 1;
n.y = 2;
diff --git a/testcases/void_decl.c b/testcases/void_decl.c
new file mode 100644
index 0000000..8a68b18
--- /dev/null
+++ b/testcases/void_decl.c
@@ -0,0 +1,3 @@
+void a;
+int main() {
+}
diff --git a/testcases/void_decl2.c b/testcases/void_decl2.c
new file mode 100644
index 0000000..30c7af6
--- /dev/null
+++ b/testcases/void_decl2.c
@@ -0,0 +1,5 @@
+struct {
+ void a;
+};
+int main() {
+}