diff options
author | Jakub Jelinek <jakub@redhat.com> | 2014-12-12 14:32:16 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2014-12-12 14:32:16 +0100 |
commit | 3597c8dec2504eb400f64639ce4a563ea657c599 (patch) | |
tree | 54c2ffc8d3808683c4bbbfcff7d66e1303666466 /gcc/tree-ssa-forwprop.c | |
parent | 8c7b90945f6b13adea05b75d01f17225fb135bac (diff) | |
download | gcc-3597c8dec2504eb400f64639ce4a563ea657c599.zip gcc-3597c8dec2504eb400f64639ce4a563ea657c599.tar.gz gcc-3597c8dec2504eb400f64639ce4a563ea657c599.tar.bz2 |
re PR tree-optimization/64269 (ICE with -O3 enabled on Ubuntu 14.04)
PR tree-optimization/64269
* tree-ssa-forwprop.c (simplify_builtin_call): Bail out if
len2 or diff are too large.
* gcc.c-torture/compile/pr64269.c: New test.
From-SVN: r218669
Diffstat (limited to 'gcc/tree-ssa-forwprop.c')
-rw-r--r-- | gcc/tree-ssa-forwprop.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c index 6c14e13..e931471 100644 --- a/gcc/tree-ssa-forwprop.c +++ b/gcc/tree-ssa-forwprop.c @@ -1288,7 +1288,8 @@ simplify_builtin_call (gimple_stmt_iterator *gsi_p, tree callee2) use_operand_p use_p; if (!tree_fits_shwi_p (val2) - || !tree_fits_uhwi_p (len2)) + || !tree_fits_uhwi_p (len2) + || compare_tree_int (len2, 1024) == 1) break; if (is_gimple_call (stmt1)) { @@ -1354,7 +1355,8 @@ simplify_builtin_call (gimple_stmt_iterator *gsi_p, tree callee2) is not constant, or is bigger than memcpy length, bail out. */ if (diff == NULL || !tree_fits_uhwi_p (diff) - || tree_int_cst_lt (len1, diff)) + || tree_int_cst_lt (len1, diff) + || compare_tree_int (diff, 1024) == 1) break; /* Use maximum of difference plus memset length and memcpy length |