[hackers] [scc] Add basic test for incomplete structs || Roberto E. Vargas Caballero
commit 4ef8edb2ea08f08fcaf8056909d014ccae1e6455
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Tue Oct 6 15:20:27 2015 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Wed Oct 7 15:26:01 2015 +0200
Add basic test for incomplete structs
diff --git a/cc1/tests/test034.c b/cc1/tests/test034.c
new file mode 100644
index 0000000..6b05d49
--- /dev/null
+++ b/cc1/tests/test034.c
_AT_@ -0,0 +1,38 @@
+
+/*
+name: TEST034
+description: Basic test for incomplete structures
+output:
+X3 S2 x
+F4 I E
+X5 F4 foo
+G6 F4 main
+{
+\
+X7 S2 x
+ r X7 'P #P0 !I
+}
+G5 F4 foo
+{
+\
+ X3 M9 .I #I0 :I
+ r X3 M9 .I
+}
+*/
+
+extern struct X x;
+int foo();
+
+int main()
+{
+ extern struct X x;
+ return &x != 0;
+}
+
+struct X {int v;};
+
+int foo()
+{
+ x.v = 0;
+ return x.v;
+}
Received on Wed Oct 07 2015 - 17:44:47 CEST
This archive was generated by hypermail 2.3.0
: Wed Oct 07 2015 - 17:48:11 CEST