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

Drea Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2026-06-18
           Keywords|                            |missed-optimization
             Status|UNCONFIRMED                 |ASSIGNED
     Ever confirmed|0                           |1
           Assignee|unassigned at gcc dot gnu.org      |pinskia at gcc dot 
gnu.org

--- Comment #1 from Drea Pinski <pinskia at gcc dot gnu.org> ---
```
  # RANGE [irange] long int [-INF, -1][1, +INF]
  _8 = _5 - _3;
  # RANGE [irange] ptrdiff_t [-2305843009213693952, 2305843009213693951]
  __dif_9 = _8 /[ex] 4;
```

ranger than could not figure out __dif_9 can't be 0 here. Even though _8 is
non-zero. EXACT_DIV_EXPR is treated similar to TRUNC_DIV_EXPR but that is not
exactly true.


I have a patch which improves the range here.

Reply via email to