summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture
diff options
context:
space:
mode:
authorkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>2005-04-29 16:23:18 +0000
committerkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>2005-04-29 16:23:18 +0000
commitf486df52cfa8a0e6ae6f8c0e1d32b1a2420d5f88 (patch)
tree7d79e5bb9ea9131043f8689608e39ddf697f7968 /gcc/testsuite/gcc.c-torture
parent3d9471be16a43b824571e1fcd447caed2d26280f (diff)
downloadgcc-f486df52cfa8a0e6ae6f8c0e1d32b1a2420d5f88.tar.gz
gcc/
PR tree-optimization/21030 * tree-vrp.c (adjust_range_with_scev): Do not create invalid ranges where VR->MAX is smaller than VR->MIN. testsuite/ PR tree-optimization/21030 * gcc.dg/tree-ssa/pr21030.c: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@98999 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.c-torture')
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr21030.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr21030.c b/gcc/testsuite/gcc.c-torture/compile/pr21030.c
new file mode 100644
index 00000000000..b7590c0edaa
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr21030.c
@@ -0,0 +1,19 @@
+/* PR tree-optimization/21030
+ VRP used to create invalid ranges where VR->MIN is greater than
+ VR->MAX. */
+
+void
+foo (int unit)
+{
+ int i;
+
+ for (i = 0; unit; i++, unit--)
+ {
+ if (i >= 0)
+ {
+ int j = i;
+ while (j)
+ j--;
+ }
+ }
+}