[LLVMbugs] [Bug 9113] New: likely integer wrong code bug
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Jan 31 13:50:21 PST 2011
http://llvm.org/bugs/show_bug.cgi?id=9113
Summary: likely integer 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, chenyang at cs.utah.edu
[regehr at gamow tmp447]$ clang -O0 small.c -o small
[regehr at gamow tmp447]$ ./small
1
[regehr at gamow tmp447]$ clang -O1 small.c -o small
[regehr at gamow tmp447]$ ./small
169
[regehr at gamow tmp447]$ clang -v
clang version 2.9 (trunk 124573)
Target: x86_64-unknown-linux-gnu
Thread model: posix
[regehr at gamow tmp447]$ cat small.c
int printf(const char *format, ...);
char g_14 = 0;
int main(void) {
unsigned int l_1 = 0;
unsigned char l_2 = 0;
l_1 = (g_14 / 5) != (unsigned char)g_14;
l_2 = l_1 + ((1 + g_14) ^ g_14);
printf("%d\n", l_2);
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