<div dir="ltr"><div>reopen 794475 =</div><div>retitle 794475 clang segfaults on failed parameter substitution in templated class or struct</div><div><br></div>Hi,<div><br></div><div>I've managed to come up with a small test case now and it's really quite small:</div><div><br></div><div>-----------------------------</div><div><div>template <typename T></div><div>struct test {</div><div>    test() { foo(); }</div><div>    void foo(int x = k) {}</div><div>};</div><div><br></div><div>int main() {</div><div>    test<int> w;</div><div>}</div></div><div>-----------------------------</div><div><br></div><div>the simplest possible invocation is enough to trigger the bug (clang++-3.6 foo.cpp)</div><div><br></div><div>The test case demonstrates that it's not the invalid use of a non-static data member that causes this (there is no member k in test), but a failure to substitute arguments. Since the crash does not occur if test isn't templated, that probably has something to do with the issue as well.</div><div><br></div><div>I hope my usage of the BTS was correct.</div><div><br></div><div>Cheers,</div><div>Lorenz</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 3, 2015 at 3:27 PM, Sylvestre Ledru <span dir="ltr"><<a href="mailto:sylvestre@debian.org" target="_blank">sylvestre@debian.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Le 03/08/2015 15:11, Lorenz Hübschle-Schneider a écrit :<br>
> Package: clang-3.6<br>
> Version: 1:3.6.2~+rc1-1~exp1<br>
> Severity: normal<br>
><br>
><br>
</span><span class="">> Unfortunately I have not been able to isolate what causes the crash or to<br>
> produce a minimal example, and I can't share the original code (yet -- it's<br>
> unpublished research).<br>
><br>
</span>Without a test case, I won't be able to do anything.<br>
<br>
Please reopen with a way to reproduce it... Sorry about that :(<br>
Maybe creduce (<a href="https://packages.debian.org/sid/creduce" rel="noreferrer" target="_blank">https://packages.debian.org/sid/creduce</a>) could help you.<br>
<span class="HOEnZb"><font color="#888888"><br>
Sylvestre<br>
<br>
</font></span></blockquote></div><br></div>