[LLVMbugs] [Bug 7586] New: possible integer wrong code bug on x64
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Jul 7 10:55:41 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=7586
Summary: possible integer wrong code bug on x64
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 -O1 foo.c -o foo
[regehr at gamow ~]$ ./foo
checksum g_166 = -10
[regehr at gamow ~]$ clang -O2 foo.c -o foo
[regehr at gamow ~]$ ./foo
checksum g_166 = -2
[regehr at gamow ~]$ clang -v
clang version 2.8 (trunk 107688)
Target: x86_64-unknown-linux-gnu
Thread model: posix
[regehr at gamow ~]$ cat small.c
extern int printf (__const char *__restrict __format, ...);
int g_14 = 0xE8B0D193L;
int g_66 = -10L;
short foo(short s1, short s2)
{
return s1 * s2;
}
int main(void)
{
int *l_320 = &g_14;
char l_441 = -9L;
if (((foo(l_441, (*l_320))) <= -1L))
g_66 = 1;
else
g_66 = 0;
printf("checksum g_66 = %d\n", g_66);
return g_66;
}
--
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