http://llvm.org/bugs/show_bug.cgi?id=17179

            Bug ID: 17179
           Summary: likely wrong code bug
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

regehr@john-home ~/z/reduce/r110 $ clang -O small.c ; ./a.out 
51
regehr@john-home ~/z/reduce/r110 $ clang -Os small.c ; ./a.out 
-6568
regehr@john-home ~/z/reduce/r110 $ cat small.c
int printf(const char *, ...);

int x0, x1, x2;

int main (void) {
  int x3;
  for (x1 = 0; x1 != 52; x1++) {
    for (x2 = 0; x2 <= 0; x2 = 1) {
      int x4 = x0 ^ x1;
      x3 = x4;
    }
  }
  printf("%d\n", x3);
  return 0;
}
regehr@john-home ~/z/reduce/r110 $ clang -v
clang version 3.4 (trunk 190381)
Target: x86_64-unknown-linux-gnu
Thread model: posix
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.7
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.7.3
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.7.3
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.7

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to