[LLVMbugs] [Bug 15921] New: clang hangs at -O2 on infinite loop
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon May 6 13:15:29 PDT 2013
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: unassignedclangbugs at nondot.org
Reporter: dhazeghi at yahoo.com
CC: llvmbugs at cs.uiuc.edu
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130506/ebb1835c/attachment.html>
More information about the llvm-bugs
mailing list