C++ PATCH for c++/53816 (ICE with local reference in template)
Jason Merrill
jason@redhat.com
Tue Jul 3 03:28:00 GMT 2012
resolves_to_fixed_type_p has caused a lot of ICEs in templates over the
years because it wants to look inside the DECL_INITIAL of variables with
non-constant initializers which are still in pre-tsubst form. Checking
processing_template_decl to prevent this isn't strong enough, because
fold_non_dependent_expr clears processing_template_decl in order to do
its tsubst folding. But instead we can test whether the current
function is not completely instantiated.
Tested x86_64-pc-linux-gnu, applying to trunk and 4.7 (more conservative
version).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 53816.patch
Type: text/x-patch
Size: 1337 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20120703/cf65eb0d/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 53816-4.7.patch
Type: text/x-patch
Size: 1371 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20120703/cf65eb0d/attachment-0001.bin>
More information about the Gcc-patches
mailing list