<html>
<head>
<base href="https://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 --- - ICE when compiling with --coverage but without -g"
href="https://llvm.org/bugs/show_bug.cgi?id=30702">30702</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>ICE when compiling with --coverage but without -g
</td>
</tr>
<tr>
<th>Product</th>
<td>tools
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</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>gccas
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>charles_li@playstation.sony.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>We noticed an ICE when compiling a file with the flag '--coverage' but without
'-g'.
This happens on many test-cases (maybe all test-cases), even empty test cases.
This ICE is related to commits r264657 and r281508.
To reproduce this crash:
Create (empty) test-case
$ touch t.cpp
Successful compilation:
$ clang -c -g --coverage t.cpp
Crash:
$ clang -c --coverage t.cpp
All DICompileUnits must be listed in llvm.dbg.cu
clang: ..../llvm/lib/IR/Verifier.cpp:4432:
virtual bool {anonymous}::VerifierLegacyPass::doFinalization(llvm::Module&):
Assertion `!V->hasBrokenDebugInfo() && "Module contains invalid debug info"'
failed.
#0 0x0000000001c81da5 llvm::sys::PrintStackTrace(llvm::raw_ostream&) ...
...
clang: error: clang frontend command failed due to signal
(use -v to see invocation) clang version 4.0.0 (trunk 281550)
Target: x86_64-unknown-linux-gnu
Thread model: posix
...
I looked into the history of this ICE.
Prior to r264657, the compiler finishes normally (return code 0).
Starting at r264657, the compiler produces the message:
All DICompileUnits must be listed in llvm.dbg.cu
and exits with a fatal error.
Starting at r281508, the compiler still produces the message:
All DICompileUnits must be listed in llvm.dbg.cu
and also triggers the Verifier.cpp failure:
"Module contains invalid debug info"
and then produces the stack dump.</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>