[C++/58583] ICE instantiating NSDMIs

Nathan Sidwell nathan@acm.org
Sun Jun 7 01:07:00 GMT 2015


This patch fixes 58582, a set of ICEs that happen instantiating NSDMIs.  There 
are a couple of causes, both fixed.

1) instantiating the  template while parsing an NSDMI of the template itself. 
We see a DEFAULT_ARG in get_nsdmi.  Fixed  by jumping to the existing error 
handling for the  non-template case.

2) recursive instantiation of the NSDMI itself.  As we instantiate lazily, we 
end up running out of stack.  Fixed by creating a temporary DEFAULT_ARG and then 
detecting it on a subsequent recursion.  I did contemplate having this direct to 
the same error as above, but decided against it, because this really is an 
instantiation problem not a parsing problem.

built & tested on x86_64-linux, ok?

nathan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 58583.patch
Type: text/x-patch
Size: 3100 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20150607/5212bb29/attachment.bin>


More information about the Gcc-patches mailing list