http://llvm.org/bugs/show_bug.cgi?id=6486
Summary: likely integer wrong code bug
Product: new-bugs
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P5
Component: new bugs
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
The -O1 result looks wrong. Seen using r97717.
reg...@john-home:~/volatile/bugs/tmp272$ clang -O0 small.c -o small -w
reg...@john-home:~/volatile/bugs/tmp272$ ./small
1
reg...@john-home:~/volatile/bugs/tmp272$ clang -O1 small.c -o small -w
reg...@john-home:~/volatile/bugs/tmp272$ ./small
0
reg...@john-home:~/volatile/bugs/tmp272$ cat small.c
#include <stdio.h>
int g_43 = 0;
int *g_92[2];
int **const g_177 = &g_92[1];
static int func_55 (void)
{
g_43 = 1;
return 1;
}
int main(void)
{
(0 <= (0 != g_177)) && func_55();
printf ("%d\n", g_43);
return 0;
}
reg...@john-home:~/volatile/bugs/tmp272$ clang -v
clang version 1.1 (trunk)
Target: i386-pc-linux-gnu
Thread model: posix
--
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