aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation
diff options
authorPekka Enberg <penberg@kernel.org>2011-09-07 17:36:40 +0300
committerPekka Enberg <penberg@kernel.org>2011-09-07 20:18:55 +0300
commitf567535353119eae0e57beef52a83519e0ebee3e (patch)
tree500e1544d80cdb57809121b0c94d8e902f1e5497 /validation
parent6d233957ef292a9552b7dba126eb1a66ff1ef9cd (diff)
downloadsparse-dev-f567535353119eae0e57beef52a83519e0ebee3e.tar.gz
sparse, llvm: Add support for struct types
Signed-off-by: Pekka Enberg <penberg@kernel.org>
Diffstat (limited to 'validation')
-rw-r--r--validation/backend/struct.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/validation/backend/struct.c b/validation/backend/struct.c
new file mode 100644
index 00000000..ef7d0d7e
--- /dev/null
+++ b/validation/backend/struct.c
@@ -0,0 +1,17 @@
+struct ctype {
+ int type;
+};
+
+struct symbol {
+ void *p;
+ const char *name;
+ struct ctype ctype;
+};
+
+static struct symbol sym;
+static struct symbol *sym_p;
+
+/*
+ * check-name: Struct code generation
+ * check-command: ./sparsec -c $file -o tmp.o
+ */