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

            Bug ID: 121764
           Summary: constant_pointer_difference and ptr_difference_const
                    seem to do the same thing
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Keywords: internal-improvement
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: pinskia at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---

constant_pointer_difference has:
/* For pointers p2 and p1 return p2 - p1 if the
   difference is known and constant, otherwise return NULL.  */

While ptr_difference_const does:
/* Returns true if addresses of E1 and E2 differ by a constant, false
   otherwise.  If they do, E1 - E2 is stored in *DIFF.  */


I suspect we could change the constant_pointer_difference usage to
ptr_difference_const  one.  Let me try that.

Reply via email to