[Bug optimization/12941] New: [tree-ssa] loop miscompilation

falk at debian dot org gcc-bugzilla@gcc.gnu.org
Fri Nov 7 14:47:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12941

           Summary: [tree-ssa] loop miscompilation
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: falk at debian dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: alphaev68-unknown-linux-gnu
  GCC host triplet: alphaev68-unknown-linux-gnu
GCC target triplet: alphaev68-unknown-linux-gnu

This makes builtin-bitops-1.c fail at -O3. Test case:

int main (void)
{
  unsigned long long x;
  int i;

  x = 2;
  for (i = 0; i < 64; i++)
    if (x & (1ULL << (64 - i - 1)))
      break;
  x = 4;
  for (i = 0; i < 64; i++)
    if (x & (1ULL << (64 - i - 1)))
      break;
  if (i != 61)
    abort ();
  return 0;
}

This aborts at -O and higher.

version: 3.5-tree-ssa 20031106



More information about the Gcc-bugs mailing list