From: paolo Date: Tue, 30 Sep 2014 17:11:38 +0000 (+0000) Subject: cp/ X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9fec010f7f41978fac1dc96eaa9826a7c12f60dd;p=thirdparty%2Fgcc.git cp/ 2014-09-30 Manuel López-Ibáñez PR c++/16564 * error.c (print_instantiation_context): Delete. * typeck2.c (build_x_arrow): Record location when pushing template instantiation. * pt.c (push_tinst_level): Make it a wrapper around ... (push_tinst_level_loc): ... this. New function. Make excessive template instantiation depth a fatal error. Record location. Use bool as return type. (instantiate_pending_templates): Make excessive template instantiation depth a fatal error. (problematic_instantiation_changed): Use bool as return type. * cp-tree.h (print_instantiation_context): Delete. (push_tinst_level): Update declaration. (problematic_instantiation_changed): Likewise. (push_tinst_level_loc): New. testsuite/ 2014-09-30 Manuel López-Ibáñez PR c++/16564 * lib/gcc.exp: Accept "fatal error:" as error prefix. * lib/g++.exp: Likewise. * lib/obj-c++.exp: Likewise. * lib/objc.exp: Likewise. * g++.dg/template/pr16564.C: New test. 2014-09-30 Paolo Carlini PR c++/16564 * g++.dg/cpp0x/decltype26.C: Adjust. * g++.dg/cpp0x/decltype28.C: Likewise. * g++.dg/cpp0x/decltype29.C: Likewise. * g++.dg/cpp0x/decltype32.C: Likewise. * g++.dg/cpp0x/enum11.C: Likewise. * g++.dg/template/arrow1.C: Likewise. * g++.dg/template/pr23510.C: Likewise. * g++.dg/template/recurse.C: Likewise. * g++.dg/template/recurse2.C: Likewise. * g++.dg/template/vtable2.C: Likewise. * g++.old-deja/g++.pt/infinite1.C: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@215734 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/testsuite/g++.dg/template/pr16564.C b/gcc/testsuite/g++.dg/template/pr16564.C new file mode 100644 index 000000000000..7a34313e906b --- /dev/null +++ b/gcc/testsuite/g++.dg/template/pr16564.C @@ -0,0 +1,10 @@ +// { dg-do compile } +template struct A +{ + A a; /* { dg-error "depth" } */ + A() {} +}; + +A a; + +// { dg-prune-output "compilation terminated" }