aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/linear/compound-literal00.c
diff options
Diffstat (limited to 'validation/linear/compound-literal00.c')
-rw-r--r--validation/linear/compound-literal00.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/validation/linear/compound-literal00.c b/validation/linear/compound-literal00.c
new file mode 100644
index 00000000..f3069d2c
--- /dev/null
+++ b/validation/linear/compound-literal00.c
@@ -0,0 +1,18 @@
+struct bfs {
+ int a: 2;
+ int b: 30;
+};
+
+int foo(void)
+{
+ return (struct bfs){ .a = 1, .b = 2}.b;
+}
+
+/*
+ * check-name: compound-literal00.c
+ * check-command: test-linearize -Wno-decl $file
+ *
+ * check-output-ignore
+ * check-output-contains: ret\\..*\\$2
+ * check-error-end
+ */