aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2011-05-30 11:15:20 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2011-05-30 11:15:20 +0000
commitf33211587118865c4f26f3806355441c4dfdb8b8 (patch)
tree461b8951a8882fd9c13e1232291f8e317d76f105 /gcc/testsuite/gcc.c-torture
parentd12d8efea8fcb3122b78b3eafb7e35fe7ec2f4bd (diff)
downloadgcc-f33211587118865c4f26f3806355441c4dfdb8b8.zip
gcc-f33211587118865c4f26f3806355441c4dfdb8b8.tar.gz
gcc-f33211587118865c4f26f3806355441c4dfdb8b8.tar.bz2
re PR tree-optimization/49218 (Incorrect optimization of a 'for' loop creates an infinite loop)
2011-05-30 Richard Guenther <rguenther@suse.de> PR tree-optimization/49218 * tree-vrp.c (adjust_range_with_scev): Properly check whether overflow occured. * gcc.c-torture/execute/pr49218.c: New testcase. From-SVN: r174429
Diffstat (limited to 'gcc/testsuite/gcc.c-torture')
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr49218.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr49218.c b/gcc/testsuite/gcc.c-torture/execute/pr49218.c
new file mode 100644
index 0000000..2fb18dd
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr49218.c
@@ -0,0 +1,20 @@
+#ifdef __SIZEOF_INT128__
+typedef __int128 L;
+#else
+typedef long long L;
+#endif
+float f;
+
+int
+main ()
+{
+ L i = f;
+ if (i <= 10)
+ do
+ {
+ ++i;
+ asm ("");
+ }
+ while (i != 11);
+ return 0;
+}