aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr34808.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr34808.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr34808.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr34808.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr34808.c
new file mode 100644
index 000000000..8224061e6
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr34808.c
@@ -0,0 +1,29 @@
+/* PR 34808 */
+/* { dg-do compile }
+/* { dg-options "-fno-tree-dominator-opts" } */
+
+extern int flags;
+
+struct r { int code; int val;};
+
+int
+foo (struct r *home)
+{
+ int n = 0;
+ int regno = -1;
+
+ if (home->code == 0)
+ regno = home->val;
+
+ if (home->code == 1)
+ bar ();
+ else if (regno >= 0)
+ n = (regno == 16
+ ? 16
+ : (regno - (unsigned long long) (flags != 0 ? 63 : 15)
+ ? regno - 128
+ : -1));
+
+ baz ();
+ return n;
+}