diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-08-26 08:03:32 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-08-26 08:03:32 +0000 |
commit | 66d11416ac2426b55cb2375fa9a207a36c85284d (patch) | |
tree | 2b0ab2f8afd3c42dedec59e572f19c4142dbf52c /gcc/tree-ssa-loop-niter.c | |
parent | c7e4cdd5199c31441e8ddd49accccfd4d6b384fd (diff) | |
download | gcc-66d11416ac2426b55cb2375fa9a207a36c85284d.tar.gz |
2014-08-26 Richard Biener <rguenther@suse.de>
PR tree-optimization/62175
* tree-ssa-loop-niter.c (expand_simple_operations): Do not
expand possibly trapping operations.
* g++.dg/torture/pr62175.C: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214492 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-loop-niter.c')
-rw-r--r-- | gcc/tree-ssa-loop-niter.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/tree-ssa-loop-niter.c b/gcc/tree-ssa-loop-niter.c index d4d3e539771..4da18556b76 100644 --- a/gcc/tree-ssa-loop-niter.c +++ b/gcc/tree-ssa-loop-niter.c @@ -1633,6 +1633,9 @@ expand_simple_operations (tree expr) case PLUS_EXPR: case MINUS_EXPR: + if (TYPE_OVERFLOW_TRAPS (TREE_TYPE (expr))) + return expr; + /* Fallthru. */ case POINTER_PLUS_EXPR: /* And increments and decrements by a constant are simple. */ e1 = gimple_assign_rhs2 (stmt); |