aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/expand/default-init-struct.c
diff options
context:
space:
mode:
Diffstat (limited to 'validation/expand/default-init-struct.c')
-rw-r--r--validation/expand/default-init-struct.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/validation/expand/default-init-struct.c b/validation/expand/default-init-struct.c
new file mode 100644
index 00000000..085dd2d6
--- /dev/null
+++ b/validation/expand/default-init-struct.c
@@ -0,0 +1,22 @@
+struct s {
+ int a;
+ int b;
+ int c;
+};
+
+
+int test_struct(void)
+{
+ struct s s = { .a = 1, .c = 3, };
+
+ return s.b;
+}
+
+/*
+ * check-name: default-init-struct
+ * check-command: test-linearize -Wno-decl -fdump-ir $file
+ *
+ * check-output-ignore
+ * check-output-contains: phisrc\\..*return.*\\$0
+ * check-output-excludes: load\\.
+ */