[LLVMbugs] [Bug 15384] New: non-terminating loops at -O3 causes clang to hang
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Feb 27 15:15:26 PST 2013
http://llvm.org/bugs/show_bug.cgi?id=15384
Bug ID: 15384
Summary: non-terminating loops at -O3 causes clang to hang
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 snippet (generated by csmith) causes top-of-trunk clang to get
stuck in an infinite loop.
$ clang-trunk -v
clang version 3.3 (trunk 176177)
Target: x86_64-pc-linux-gnu
Thread model: posix
$ cat crash18.c
/* clang -O3 */
int a, b, c, d;
void static
fn1 (int *p1)
{
for (;;)
{
*p1 = 1;
for (; c; ++c)
{
int *e = &d;
*e = *p1;
b = 0;
for (; b; b++)
*p1 = *e = 0;
}
}
}
int main ()
{
fn1 (&a);
}
$ clang -O2 crash18.c
$ clang -O3 crash18.c
<hangs>
$
--
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/20130227/74de2329/attachment.html>
More information about the llvm-bugs
mailing list