diff options
author | Richard Guenther <rguenther@suse.de> | 2011-05-30 11:15:20 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2011-05-30 11:15:20 +0000 |
commit | f33211587118865c4f26f3806355441c4dfdb8b8 (patch) | |
tree | 461b8951a8882fd9c13e1232291f8e317d76f105 /gcc/testsuite/gcc.c-torture | |
parent | d12d8efea8fcb3122b78b3eafb7e35fe7ec2f4bd (diff) | |
download | gcc-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.c | 20 |
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; +} |