https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86696

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |msebor at gcc dot 
gnu.org

--- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> ---
Confirmed.  It's due using INTEGER_TYPE rather than INTEGRAL_TYPE_P().  The
following corrects the bug:

Index: gcc/tree-ssa-strlen.c
===================================================================
--- gcc/tree-ssa-strlen.c       (revision 263029)
+++ gcc/tree-ssa-strlen.c       (working copy)
@@ -3150,7 +3150,7 @@ handle_pointer_plus (gimple_stmt_iterator *gsi)
 static HOST_WIDE_INT
 get_min_string_length (tree rhs, bool *full_string_p)
 {
-  if (TREE_CODE (TREE_TYPE (rhs)) == INTEGER_TYPE)
+  if (INTEGRAL_TYPE_P (TREE_TYPE (rhs)))
     {
       if (tree_expr_nonzero_p (rhs))
        {

Reply via email to