http://llvm.org/bugs/show_bug.cgi?id=15921
Bug ID: 15921
Summary: clang hangs at -O2 on infinite loop
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 testcase causes current clang trunk to hang, when compiled at -O2
or higher optimization level.
$ clang -v
clang version 3.3 (trunk 181189)
Target: x86_64-pc-linux-gnu
Thread model: posix
$ clang -Os test.c
$ clang -O2 test.c
<hangs>
$ cat test.c
short a;
int b;
void fn1 (short *p1)
{
b = 15;
for (; b != -15; b = b - 1)
a = *p1 * *p1;
}
int main ()
{
for (;;)
fn1 (&a);
return 0;
}
--
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