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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2023-07-10

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.

(gdb) p lb
$1 = {<wide_int_storage> = {val = {2, 45595810, 140737488342608, 
      140737488342672, 140737488341240, 2147483664, 8, 140737339338752, 0}, 
    len = 1, precision = 32}, static is_sign_extended = true}
(gdb) p ub
$2 = {<wide_int_storage> = {val = {1, 1, 1, 1, 140737488341320, 2147483664, 
      140737471578113, 0, 140735340871686}, len = 1, precision = 32}, 
  static is_sign_extended = true}

from

#4  0x0000000002b7c5d7 in (anonymous namespace)::try_substitute_return_value (
    gsi=0x7fffffffda18, info=..., res=...)
    at /space/rguenther/src/gcc/gcc/gimple-ssa-sprintf.cc:4254

  else if (lhs && types_compatible_p (TREE_TYPE (lhs), integer_type_node))
    {
      bool setrange = false;

      if (safe
          && (info.bounded || retval[1] < info.objsize)
          && (retval[0] < target_int_max ()
              && retval[1] < target_int_max ()))
        { 
          /* If the result is in a valid range bounded by the size of
             the destination set it so that it can be used for subsequent
             optimizations.  */
          int prec = TYPE_PRECISION (integer_type_node);

          wide_int min = wi::shwi (retval[0], prec);
          wide_int max = wi::shwi (retval[1], prec);
          value_range r (TREE_TYPE (lhs), min, max);
          set_range_info (lhs, r); 


The issue is likely older but only triggered with recent ranger changes
(on the verifier side?).

Reply via email to