http://llvm.org/bugs/show_bug.cgi?id=11340
Bug #: 11340
Summary: clang wrong code bug
Product: new-bugs
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: new bugs
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
[regehr@gamow tmp050]$ clang -O1 small.c ; ./a.out
0
[regehr@gamow tmp050]$ clang -O2 small.c ; ./a.out
1
[regehr@gamow tmp050]$ clang -v
clang version 3.1 (trunk 144028)
Target: x86_64-unknown-linux-gnu
Thread model: posix
[regehr@gamow tmp050]$ cat small.c
int printf (const char *, ...);
int func_4 (int si1)
{
return si1;
}
int func_25 (int ui2)
{
return 1 / ui2;
}
int g_9;
int g_190 = 1;
int main ()
{
if (func_25 (func_4 (g_9 <= 0))) g_190 = 0;
printf ("%d\n", g_190);
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