[LLVMbugs] [Bug 8244] New: clang integer wrong code bug
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Sep 27 15:58:26 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=8244
Summary: clang 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 ~]$ clang -v
clang version 2.9 (trunk 114808)
Target: x86_64-unknown-linux-gnu
Thread model: posix
[regehr at gamow ~]$ clang -O0 small.c -o small
[regehr at gamow ~]$ ./small
g = -1
[regehr at gamow ~]$ clang -O1 small.c -o small
[regehr at gamow ~]$ ./small
g = 0
[regehr at gamow ~]$ cat small.c
char g = -2;
int printf (const char *format, ...);
void
func_1 (void)
{
int t_7 = g;
g = (char) (t_7 >> 8U);
}
int
main (void)
{
func_1 ();
printf ("g = %d\n", g);
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