<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 --- - LTO build-time crash when building at -O2 -g"
href="http://llvm.org/bugs/show_bug.cgi?id=22456">22456</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>LTO build-time crash when building at -O2 -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>lto
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>warren_ristow@playstation.sony.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>The following "test.cpp" (along with the stub "alpha.cpp", for completeness)
gets a crash at build-time during LTO, when both -O2 and -g are used.
Tested with r228115. Target: x86_64-unknown-linux-gnu
// ================ test.cpp =================
float alpha();
struct Bravo {
Bravo(float) {}
};
struct Charlie {
Charlie(Bravo delta) { echo(0, 0); }
void echo(Bravo, float) { alpha(); }
};
void foxtrot(Bravo) { Charlie(Bravo(0)); }
int main(){}
// ===========================================
// ================ alpha.cpp ================
float alpha() { return 0.0f; }
// ===========================================
$ clang++ -c -O2 -g -flto alpha.cpp test.cpp
$ clang++ -o tst.x -flto alpha.o test.o
All nodes should be resolved!
<0x29f3a68>
LLVM ERROR: Broken function found, compilation aborted!
clang: error: linker command failed with exit code 1 (use -v to see invocation)
$
The build succeeds if either the optimization level is dropped to -O1, or -g
is removed.
Bisecting it indicates that it began failing with r226736.</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>