From: jason Date: Fri, 27 Jun 2014 21:38:24 +0000 (+0000) Subject: PR c++/61433 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=aa2aac028fa1e82782f6eb837e4022e38904abc1;p=thirdparty%2Fgcc.git PR c++/61433 * error.c (dump_template_bindings): Don't tsubst in a clone. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212091 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 90ec8ad008be..2236a5c948a4 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2014-06-27 Jason Merrill + + PR c++/61433 + * error.c (dump_template_bindings): Don't tsubst in a clone. + 2014-06-27 Paolo Carlini PR c++/61614 diff --git a/gcc/cp/error.c b/gcc/cp/error.c index 27a167a001a8..fa3bdc4f6a58 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -318,6 +318,11 @@ dump_template_bindings (cxx_pretty_printer *pp, tree parms, tree args, if (vec_safe_is_empty (typenames) || uses_template_parms (args)) return; + /* Don't try to print typenames when we're processing a clone. */ + if (current_function_decl + && !DECL_LANG_SPECIFIC (current_function_decl)) + return; + FOR_EACH_VEC_SAFE_ELT (typenames, i, t) { if (need_semicolon) diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/pr61433.C b/gcc/testsuite/g++.dg/debug/dwarf2/pr61433.C new file mode 100644 index 000000000000..a63b8a9ef2fb --- /dev/null +++ b/gcc/testsuite/g++.dg/debug/dwarf2/pr61433.C @@ -0,0 +1,23 @@ +// PR c++/61433 +// { dg-do compile { target c++11 } } +// { dg-options "-O -fcompare-debug -fno-inline -fno-ipa-pure-const -fipa-sra" } + +template +struct A +{ + template + struct B + { + int MEM; + }; +}; +struct D {}; +struct C: public A::B +{}; +template +auto k(T t, U u, V v) -> decltype (t.U::template B::MEM) +{} +int main() +{ + k( C(), A(), D() ); +}