This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi,some time ago I started analyzing the bugs in Bugzilla involving crashes for too deep recursive template instantiation and figured out that this subset is probably the simplest to tackle (https://gcc.gnu.org/ml/gcc-patches/2013-08/msg01348.html). All these crashes involve instantiate_class_template_1 *before* the existing push_tinst_level check, via most_specialized_class, and I think it makes sense to protect it in a way very similar to that used in maybe_instantiate_noexcept. Lately I also tried simply moving the existing check before most_specialized_class and it mostly worked for C++, but regressions showed up in the libstdc++-v3 testsuite (mostly in 20_util). As regards the testcases, template/recurse.C is tweaked because the diagnostic about template instantiation depth exceed is exactly the same but isn't duplicated anymore.
Anyway, tested x86_64-linux. Thanks, Paolo. /////////////////////////
Attachment:
CL_51488_53618_58059
Description: Text document
Attachment:
patch_51488_53618_58059
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |