aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr110992.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr110992.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr110992.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr110992.c b/gcc/testsuite/gcc.dg/pr110992.c
new file mode 100644
index 0000000..05e9b92
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr110992.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-evrp" } */
+
+void foo (int);
+
+int f(unsigned b, short c)
+{
+ int bt = b;
+ int bt1 = bt;
+ int t = bt1 & -(c!=0);
+ // int t = bt1 * (c!=0);
+
+ if (!t) return 0;
+ foo(bt == 0);
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "foo \\(0\\)" 1 "evrp" } } */