[LLVMbugs] [Bug 12541] New: wrong code bug
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Apr 12 17:00:17 PDT 2012
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: unassignedbugs at nondot.org
ReportedBy: regehr at cs.utah.edu
CC: chenyang at cs.utah.edu, llvmbugs at cs.uiuc.edu
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 at dyson r26]$ gcc small.c ; ./a.out
1
[regehr at dyson r26]$ clang small.c ; ./a.out
1
[regehr at dyson r26]$ clang -O small.c ; ./a.out
0
[regehr at 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 at 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.
More information about the llvm-bugs
mailing list