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