aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/mem2reg/global-direct-undef.c
diff options
Diffstat (limited to 'validation/mem2reg/global-direct-undef.c')
-rw-r--r--validation/mem2reg/global-direct-undef.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/validation/mem2reg/global-direct-undef.c b/validation/mem2reg/global-direct-undef.c
new file mode 100644
index 00000000..34960e74
--- /dev/null
+++ b/validation/mem2reg/global-direct-undef.c
@@ -0,0 +1,23 @@
+int a, c, d;
+
+int foo(void)
+{
+ int b, e;
+ if (a)
+ b = c;
+ else
+ b = d;
+ if (c)
+ a = b;
+ if (b)
+ e = a;
+ return e;
+}
+
+/*
+ * check-name: global direct undef
+ * check-command: test-linearize -Wno-decl -fdump-ir=mem2reg $file
+ * check-output-ignore
+ * check-output-pattern(4,5): load\\.
+ * check-output-pattern(1): store\\.
+ */