This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/71718] [6/7 Regression] ICE on erroneous recursive template error printing
- From: "msebor at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 01 Jul 2016 22:05:02 +0000
- Subject: [Bug c++/71718] [6/7 Regression] ICE on erroneous recursive template error printing
- Auto-submitted: auto-generated
- References: <bug-71718-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71718
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |msebor at gcc dot gnu.org
Known to fail| |4.8.5, 4.9.3, 5.3.0, 6.1.0,
| |7.0
--- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> ---
The likely commit to introduce the ICE is r191412 in the 4.8 time frame:
r191412 | jason | 2012-09-17 23:47:35 -0400 (Mon, 17 Sep 2012) | 4 lines
PR c++/54575
* pt.c (instantiate_alias_template): New.
(tsubst): Use it.
(push_access_scope): Allow TYPE_DECL.
The last relevant one before that was r191400 which errors out with:
t.C:14:26: error: template instantiation depth exceeds maximum of 32 (use
-ftemplate-depth= to increase the maximum) substituting âtemplate<class T, int
num> sp<T> rec() [with T = <missing>; int num = <missing>]â
return rec<T, num - 1>();
^
t.C:14:26: recursively required from âsp<T> rec() [with T = Base; int num =
0; sp<T> = A<Base>]â
t.C:14:26: required from âsp<T> rec() [with T = Base; int num = 1; sp<T> =
A<Base>]â
t.C:18:13: required from here
t.C:14:26: error: no matching function for call to ârec()â
t.C:14:26: note: candidate is:
t.C:12:3: note: template<class T, int num> sp<T> rec()
rec()
^
t.C:12:3: note: substitution of deduced template arguments resulted in errors
seen above