[Bug middle-end/78750] [7 Regression] ICE in get_range_info, at tree-ssanames.c:375

mpolacek at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Dec 9 13:26:00 GMT 2016


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

--- Comment #5 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Actually, this should be better:

--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -3091,7 +3091,7 @@ check_sizes (int opt, tree exp, tree size, tree maxlen,
tree str, tree objsize)
     {
       /* STR is normally a pointer to string but as a special case
     it can be an integer denoting the length of a string.  */
-      if (TREE_CODE (TREE_TYPE (str)) == POINTER_TYPE)
+      if (POINTER_TYPE_P (TREE_TYPE (str)))
    {
      /* Try to determine the range of lengths the source string
         refers to.  If it can be determined add one to it for


More information about the Gcc-bugs mailing list