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

            Bug ID: 96433
           Summary: Failed to optimize (A / N) * N <= A
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: david.bolvansky at gmail dot com
  Target Milestone: ---

const __SIZE_TYPE__ N = 3;

int foo(__SIZE_TYPE__ len) {
        __SIZE_TYPE__ newlen = (len / N) * N;
        return newlen <= len;
}

Reply via email to