aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp71.c22
2 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 7fd300e..556da4d 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,10 @@
2012-06-29 Richard Guenther <rguenther@suse.de>
+ PR tree-optimization/47061
+ * gcc.dg/tree-ssa/vrp71.c: New testcase.
+
+2012-06-29 Richard Guenther <rguenther@suse.de>
+
PR tree-optimization/37541
* gcc.dg/tree-ssa/pr37508.c: Adjust and un-XFAIL.
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp71.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp71.c
new file mode 100644
index 0000000..2d1a240
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp71.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-vrp1" } */
+
+int foo(int *p)
+{
+ int x = -10;
+ if (p[0]) x++;
+ if (p[1]) x++;
+ if (p[2]) x++;
+ if (p[3]) x++;
+ x <<= 2;
+ return (x > 0);
+}
+
+int bar(char c)
+{
+ int i = c << 1;
+ return i > 1000;
+}
+
+/* { dg-final { scan-tree-dump-times "return 0;" 2 "vrp1" } } */
+/* { dg-final { cleanup-tree-dump "vrp1" } } */