This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]