[PR c++/84804] ICE with default arg, template friend & lambda

Nathan Sidwell nathan@acm.org
Wed Mar 21 16:02:00 GMT 2018


When instantiating a template we end up with a rather strange binding 
hierarchy -- the innermost binding is the template and the next one is 
the instantiation.  Anyway, the upshot is we end up trying to push a 
tsubst'd lambda into the template itself and die because that's marked 
as a complete type.  All somewhat suspicious.

However, there as a 'scope == ts_lambda' escape on that check, and I'd 
removed it because it seemed unneeded.  Sadly not.  As we now never pass 
ts_lambda into do_pushtag, we have to inspect the type being pushed to 
determine this check.  This gets us back to the older behaviour, but at 
least we push into the instantiation, not the template because of 
changes I made earlier.

nathan
-- 
Nathan Sidwell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 84804.diff
Type: text/x-patch
Size: 1203 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20180321/ab9fd1cd/attachment.bin>


More information about the Gcc-patches mailing list