[LLVMbugs] [Bug 9454] New: clang wrong code bug
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Mar 10 20:07:08 PST 2011
http://llvm.org/bugs/show_bug.cgi?id=9454
Summary: clang wrong code bug
Product: new-bugs
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: regehr at cs.utah.edu
CC: llvmbugs at cs.uiuc.edu
[regehr at gamow ~]$ clang -v
clang version 3.0 (trunk 127456)
Target: x86_64-unknown-linux-gnu
Thread model: posix
[regehr at gamow ~]$ clang -O0 small.c -o small
[regehr at gamow ~]$ ./small
g_331 = 1
[regehr at gamow ~]$ clang -O1 small.c -o small
[regehr at gamow ~]$ ./small
g_331 = 2
[regehr at gamow ~]$ cat small.c
int g_34 = 1;
static int g_331;
int printf(const char *format, ...);
int main (int argc, char* argv[])
{
g_331 = 1 + ((g_34 & 2) == g_34);
printf("g_331 = %d\n", g_331);
return 0;
}
--
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