aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/expand/cost-deref-nested.c
diff options
context:
space:
mode:
Diffstat (limited to 'validation/expand/cost-deref-nested.c')
-rw-r--r--validation/expand/cost-deref-nested.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/validation/expand/cost-deref-nested.c b/validation/expand/cost-deref-nested.c
new file mode 100644
index 00000000..d6b62396
--- /dev/null
+++ b/validation/expand/cost-deref-nested.c
@@ -0,0 +1,20 @@
+struct s {
+ struct {
+ int u, v;
+ } a, b;
+};
+
+static const struct s s;
+
+static int foo(int c)
+{
+ return c && s.b.v;
+}
+
+/*
+ * check-name: cost-deref-nested
+ * check-command: test-linearize -fdump-ir $file
+ *
+ * check-output-ignore
+ * check-output-excludes: cbr
+ */