http://llvm.org/bugs/show_bug.cgi?id=7768
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: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
reg...@john-home:~/work014$ clang -O1 small.c -o small
reg...@john-home:~/work014$ ./small
-7
reg...@john-home:~/work014$ clang -O2 small.c -o small
reg...@john-home:~/work014$ ./small
-1
reg...@john-home:~/work014$ clang -v
clang version 2.8 (trunk 109858)
Target: i386-pc-linux-gnu
Thread model: posix
reg...@john-home:~/work014$ cat small.c
extern int printf (__const char *__restrict __format, ...);
int g_13 = -7L;
int g_81 = 0x249DD628L;
int *g_125 = &g_81;
int *g_188 = &g_81;
int **g_303 = &g_188;
int *l_337 = &g_81;
int **l_352[2];
int main(void)
{
int i;
for (i = 0; i < 2; i++) {
l_352[i] = &l_337;
}
int x = (g_81 != (*g_125)) <= (0x6749929EL <= (*g_125));
int z = !(l_352[1] == 0);
int y = -7L * z;
g_81 = x * y;
printf("%d\n", g_81);
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