aboutsummaryrefslogtreecommitdiff
path: root/testcases
diff options
context:
space:
mode:
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() {
+}