re PR c++/16564 (g++ seems to go into an infinite loop after errors)
authorPaolo Carlini <paolo@gcc.gnu.org>
Tue, 30 Sep 2014 17:10:35 +0000 (17:10 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Tue, 30 Sep 2014 17:10:35 +0000 (17:10 +0000)
commit75a0d320063941e878f65177f59d2c0e5515472a
tree5132174a9e3a445876514de05089e31579631785
parentcc811a8ae6c760955ac2dca51d8359d003c8e4f2
re PR c++/16564 (g++ seems to go into an infinite loop after errors)

cp/
2014-09-30  Manuel López-Ibáñez  <manu@gcc.gnu.org>

       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  <manu@gcc.gnu.org>

       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  <paolo.carlini@oracle.com>

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.

From-SVN: r215733
21 files changed:
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/error.c
gcc/cp/pt.c
gcc/cp/typeck2.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/decltype26.C
gcc/testsuite/g++.dg/cpp0x/decltype28.C
gcc/testsuite/g++.dg/cpp0x/decltype29.C
gcc/testsuite/g++.dg/cpp0x/decltype32.C
gcc/testsuite/g++.dg/cpp0x/enum11.C
gcc/testsuite/g++.dg/template/arrow1.C
gcc/testsuite/g++.dg/template/pr23510.C
gcc/testsuite/g++.dg/template/recurse.C
gcc/testsuite/g++.dg/template/recurse2.C
gcc/testsuite/g++.dg/template/vtable2.C
gcc/testsuite/g++.old-deja/g++.pt/infinite1.C
gcc/testsuite/lib/g++.exp
gcc/testsuite/lib/gcc.exp
gcc/testsuite/lib/obj-c++.exp
gcc/testsuite/lib/objc.exp