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

             Bug #: 12541
           Summary: wrong code bug
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified


I have a few wrong-code bug reports in the system already but this one has such
a tiny test case it seems to need reporting as well.

[regehr@dyson r26]$ gcc small.c ; ./a.out 
1
[regehr@dyson r26]$ clang small.c ; ./a.out 
1
[regehr@dyson r26]$ clang -O small.c ; ./a.out 
0
[regehr@dyson r26]$ cat small.c
int printf (const char *, ...);
int a, b;
int
main ()
{
    a = (char) (1656690544 % (b ^ 3));
    printf ("%d\n", a);
    return 0;
}
[regehr@dyson r26]$ clang -v
clang version 3.1 (trunk 154589)
Target: x86_64-unknown-linux-gnu
Thread model: posix

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- 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