<html>
<head>
<base href="https://bugs.llvm.org/">
</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 - unexpected crash - does not happen on g++"
href="https://bugs.llvm.org/show_bug.cgi?id=38914">38914</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>unexpected crash - does not happen on g++
</td>
</tr>
<tr>
<th>Product</th>
<td>libc++
</td>
</tr>
<tr>
<th>Version</th>
<td>6.0
</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>All Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>duduarbel@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, mclow.lists@gmail.com
</td>
</tr></table>
<p>
<div>
<pre>This program crashes before starting.
on g++ - it runs as expected.
it seems like a bug:
#include <iostream>
struct InnerCls
{
InnerCls() { std::cout<<__FUNCTION__<<std::endl;}
~InnerCls() { std::cout<<__FUNCTION__<<std::endl;}
void foo() {std::cout<<__FUNCTION__<<std::endl;}
};
template <class T>
class Cls
{
public:
Cls() { innerCls.foo(); }
static InnerCls innerCls;
};
template<class T>
InnerCls Cls<T>::innerCls ;
int main()
{
Cls<int> x;
}</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>