http://llvm.org/bugs/show_bug.cgi?id=15479
Bug ID: 15479
Summary: non-terminating loop at -Os causes clang to hang
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: LLVM Codegen
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
The following code (derived from a test generated by csmith) causes
top-of-trunk clang to get stuck in an infinite loop when compiled at -Os or
higher. At -O1 or below, the compilation succeeds. This may be related for
15386 but that bug only triggers at -O2 or higher.
$ clang-trunk -v
clang version 3.3 (trunk 176687)
Target: x86_64-pc-linux-gnu
Thread model: posix
$ clang-trunk -O1 -c crash8.c
$ clang-trunk -Os -c crash8.c
<hangs>
$ cat crash8.c
int a, b;
int fn1 (int p1, unsigned char p2)
{
return p1 * p2;
}
int fn3();
void fn2 ()
{
int c;
for (;;)
{
c ^= a &= 1;
if (fn3 ())
c = 0;
else
b = b;
c = fn1 (b > 0, c);
}
}
--
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