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

            Bug ID: 126742
           Summary: Wrong code for a != b | (a|b) != 0
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kristerw at gcc dot gnu.org
            Blocks: 118443
  Target Milestone: ---

The test below fails when compiled for x86_64 with -O1:

unsigned f(unsigned a, unsigned b)
{
  unsigned c = a != b;
  unsigned d = (a|b) != 0;
  return c | d;
}

int main()
{
  if (!f(1, 1))
    __builtin_abort();
  return 0;
}


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118443
[Bug 118443] [Meta bug] Bugs triggered by and blocking more smtgcc testing

Reply via email to