<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Clang hangs at -O1"
href="http://llvm.org/bugs/show_bug.cgi?id=15851">15851</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Clang hangs at -O1
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>antoine.balestrat@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Using LLVM/Clang as of r180602 :
$ cat inf.c
void f(void)
{
int i, **p;
f();
for(;; i++)
for(i = 0; i < 2; i++)
(i /= 2) && (**p = 0);
}
$ ulimit -t 60
$ clong -O1 -w inf.c
0 clang 0x0000000001d6ab62 llvm::sys::PrintStackTrace(_IO_FILE*) +
34
1 clang 0x0000000001d6a881
2 libpthread.so.0 0x00007f74b261d030
3 libc.so.6 0x00007f74b1751132
4 libc.so.6 0x00007f74b1754aac cfree + 108
5 clang 0x0000000001d1a1b3 llvm::Value::~Value() + 515
6 clang 0x0000000001cee907
7 clang 0x0000000001b26825
8 clang 0x0000000001a71ff2
llvm::SimplifyInstructionsInBlock(llvm::BasicBlock*, llvm::DataLayout const*,
llvm::TargetLibraryInfo const*) + 354
9 clang 0x0000000001969d95
10 clang 0x000000000196ab19
11 clang 0x000000000196bdea
12 clang 0x0000000001d049af
llvm::FPPassManager::runOnFunction(llvm::Function&) + 655
13 clang 0x0000000001ac20f6
14 clang 0x0000000001d044d7
llvm::MPPassManager::runOnModule(llvm::Module&) + 663
15 clang 0x0000000001d0467f llvm::PassManagerImpl::run(llvm::Module&)
+ 207
16 clang 0x00000000008f66b2
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::Module*,
clang::BackendAction, llvm::raw_ostream*) + 3458
17 clang 0x00000000008f432f
18 clang 0x0000000000a5793a clang::ParseAST(clang::Sema&, bool, bool)
+ 538
19 clang 0x00000000008f2abe clang::CodeGenAction::ExecuteAction() +
78
20 clang 0x000000000077b499 clang::FrontendAction::Execute() + 265
21 clang 0x000000000075d9fa
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 346
22 clang 0x00000000007456a2
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1794
23 clang 0x000000000073f9a8 cc1_main(char const**, char const**, char
const*, void*) + 920
24 clang 0x00000000007330c0 main + 7744
25 libc.so.6 0x00007f74b16f7ead __libc_start_main + 253
26 clang 0x000000000073f461
Stack dump:
0. Program arguments: /home/merkil/clang/build/Release+Asserts/bin/clang
-cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name
inf.c -mrelocation-model static -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64
-target-linker-version 2.22 -momit-leaf-frame-pointer -resource-dir
/home/merkil/clang/build/Release+Asserts/bin/../lib/clang/3.3 -internal-isystem
/usr/local/include -internal-isystem
/home/merkil/clang/build/Release+Asserts/bin/../lib/clang/3.3/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O1
-w -fdebug-compilation-dir /home/merkil -ferror-limit 19 -fmessage-length 169
-mstackrealign -fobjc-runtime=gcc -fobjc-default-synthesize-properties
-fdiagnostics-show-option -fcolor-diagnostics -backend-option -vectorize-loops
-o /tmp/inf-ne2Y62.o -x c inf.c
1. <eof> parser at end of file
2. Per-module optimization passes
3. Running pass 'CallGraph Pass Manager' on module 'inf.c'.
4. Running pass 'Jump Threading' on function '@f'
clang: error: unable to execute command: CPU time limit exceeded
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.3 (trunk 180602)
Target: x86_64-unknown-linux-gnu
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to
<a href="http://llvm.org/bugs/">http://llvm.org/bugs/</a> and include the crash backtrace, preprocessed source, and
associated run script.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>