From: Jason Merrill Date: Fri, 21 Nov 2014 21:35:00 +0000 (-0500) Subject: re PR c++/63849 ([c++11] ICE on variadic alias template with wrappers) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6602e1095db5259590fa8813f48a1404ba00cf10;p=gcc.git re PR c++/63849 ([c++11] ICE on variadic alias template with wrappers) PR c++/63849 * mangle.c (decl_mangling_context): Use template_type_parameter_p. From-SVN: r217949 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 89d4ade46f9..652ec9ca63e 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2014-11-21 Jason Merrill + PR c++/63849 + * mangle.c (decl_mangling_context): Use template_type_parameter_p. + PR c++/63588 * pt.c (uses_template_parms): Handle null argument. diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c index 4c63df042fa..9f0d9d8ed77 100644 --- a/gcc/cp/mangle.c +++ b/gcc/cp/mangle.c @@ -764,8 +764,7 @@ decl_mangling_context (tree decl) if (extra) return extra; } - else if (TREE_CODE (decl) == TYPE_DECL - && TREE_CODE (TREE_TYPE (decl)) == TEMPLATE_TYPE_PARM) + else if (template_type_parameter_p (decl)) /* template type parms have no mangling context. */ return NULL_TREE; return CP_DECL_CONTEXT (decl); diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-44.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-44.C new file mode 100644 index 00000000000..bd20b54f142 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-44.C @@ -0,0 +1,43 @@ +// PR c++/63849 +// { dg-do compile { target c++11 } } + +template +using First = _T; // we should not use this + // alias with only + // one pack parameter (?) + +template