<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:david.majnemer@gmail.com" title="David Majnemer <david.majnemer@gmail.com>"> <span class="fn">David Majnemer</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - link success with static template member depends on optimisation level"
href="http://llvm.org/bugs/show_bug.cgi?id=20593">bug 20593</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>REOPENED
</td>
<td>RESOLVED
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>INVALID
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - link success with static template member depends on optimisation level"
href="http://llvm.org/bugs/show_bug.cgi?id=20593#c4">Comment # 4</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - link success with static template member depends on optimisation level"
href="http://llvm.org/bugs/show_bug.cgi?id=20593">bug 20593</a>
from <span class="vcard"><a class="email" href="mailto:david.majnemer@gmail.com" title="David Majnemer <david.majnemer@gmail.com>"> <span class="fn">David Majnemer</span></a>
</span></b>
<pre>The optimizer is still able to prove that it doesn't need to reference the
actual static.
The following is an example that will have a linker error under all levels of
optimizations:
template <class T>
struct foo {
static int alloc;
};
int main() {
return foo<int>::alloc;
}
Note that this program, and all of the programs you have posted, have undefined
behavior because they don't provide a definition of the static variable.</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>