diff options
author | Jakub Jelinek <jakub@redhat.com> | 2018-02-21 11:35:46 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2018-02-21 11:35:46 +0100 |
commit | c8602fe6127fde5e75b4f9288f86d33a5b885660 (patch) | |
tree | f3981f123f3057a2fd6c9ed37212047a644e425f /gcc/gimple-fold.h | |
parent | b22dbd03f06c5d3b5e71ae99b55b5d7d21a11cd9 (diff) | |
download | gcc-c8602fe6127fde5e75b4f9288f86d33a5b885660.zip gcc-c8602fe6127fde5e75b4f9288f86d33a5b885660.tar.gz gcc-c8602fe6127fde5e75b4f9288f86d33a5b885660.tar.bz2 |
re PR tree-optimization/84478 (pdftex miscompilation on i386)
PR tree-optimization/84478
* gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
false.
* gimple-fold.c (get_range_strlen): Make minlen const and assume it
can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
support which is conservatively correct, for 2 only stay conservative
for maxlen. Formatting and comment capitalization fixes. Add STRICT
argument to the 2 argument get_range_strlen, adjust 6 arg
get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
false.
(get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
(gimple_fold_builtin_strlen): Pass true as last argument to
get_range_strlen.
* gcc.c-torture/execute/pr84478.c: New test.
Co-Authored-By: Martin Sebor <msebor@redhat.com>
From-SVN: r257870
Diffstat (limited to 'gcc/gimple-fold.h')
-rw-r--r-- | gcc/gimple-fold.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/gimple-fold.h b/gcc/gimple-fold.h index 94fa460..d0c4044 100644 --- a/gcc/gimple-fold.h +++ b/gcc/gimple-fold.h @@ -25,7 +25,7 @@ along with GCC; see the file COPYING3. If not see extern tree create_tmp_reg_or_ssa_name (tree, gimple *stmt = NULL); extern tree canonicalize_constructor_val (tree, tree); extern tree get_symbol_constant_value (tree); -extern bool get_range_strlen (tree, tree[2]); +extern bool get_range_strlen (tree, tree[2], bool = false); extern tree get_maxval_strlen (tree, int); extern void gimplify_and_update_call_from_tree (gimple_stmt_iterator *, tree); extern bool fold_stmt (gimple_stmt_iterator *); |