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: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
[reg...@gamow ~]$ clang -v
clang version 2.9 (trunk 114808)
Target: x86_64-unknown-linux-gnu
Thread model: posix
[reg...@gamow ~]$ clang -O0 small.c -o small
[reg...@gamow ~]$ ./small
g = -1
[reg...@gamow ~]$ clang -O1 small.c -o small
[reg...@gamow ~]$ ./small
g = 0
[reg...@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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs