]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR tree-optimization/84478 (pdftex miscompilation on i386)
authorJakub Jelinek <jakub@redhat.com>
Wed, 21 Feb 2018 10:35:46 +0000 (11:35 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 21 Feb 2018 10:35:46 +0000 (11:35 +0100)
commitc8602fe6127fde5e75b4f9288f86d33a5b885660
treef3981f123f3057a2fd6c9ed37212047a644e425f
parentb22dbd03f06c5d3b5e71ae99b55b5d7d21a11cd9
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
gcc/ChangeLog
gcc/gimple-fold.c
gcc/gimple-fold.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/pr84478.c [new file with mode: 0644]