[LLVMbugs] [Bug 6486] New: likely integer wrong code bug
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Mar 3 20:00:04 PST 2010
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: unassignedbugs at nondot.org
ReportedBy: regehr at cs.utah.edu
CC: llvmbugs at cs.uiuc.edu, chenyang at cs.utah.edu
The -O1 result looks wrong. Seen using r97717.
regehr at john-home:~/volatile/bugs/tmp272$ clang -O0 small.c -o small -w
regehr at john-home:~/volatile/bugs/tmp272$ ./small
1
regehr at john-home:~/volatile/bugs/tmp272$ clang -O1 small.c -o small -w
regehr at john-home:~/volatile/bugs/tmp272$ ./small
0
regehr at 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;
}
regehr at 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.
More information about the llvm-bugs
mailing list