Commit 973590f3 by Andrea Azzarone Committed by Paolo Carlini

re PR c++/65071 (ICE on valid, sizeof...() of template template parameter pack in return type)

/cp
2015-07-14  Andrea Azzarone  <azzaronea@gmail.com>

	PR c++/65071
	* parser.c (cp_parser_sizeof_pack): Also consider template template
	parameters.

/testsuite
2015-07-14  Andrea Azzarone  <azzaronea@gmail.com>

	PR c++/65071
	* g++.dg/cpp0x/vt-65071.C: New.

From-SVN: r225793
parent 42e6ab74
2015-07-14 Andrea Azzarone <azzaronea@gmail.com>
PR c++/65071
* parser.c (cp_parser_sizeof_pack): Also consider template template
parameters.
2015-07-14 Jason Merrill <jason@redhat.com>
* call.c (build_new_method_call_1): Call reshape_init.
......
......@@ -24468,7 +24468,7 @@ cp_parser_sizeof_pack (cp_parser *parser)
if (expr == error_mark_node)
cp_parser_name_lookup_error (parser, name, expr, NLE_NULL,
token->location);
if (TREE_CODE (expr) == TYPE_DECL)
if (TREE_CODE (expr) == TYPE_DECL || TREE_CODE (expr) == TEMPLATE_DECL)
expr = TREE_TYPE (expr);
else if (TREE_CODE (expr) == CONST_DECL)
expr = DECL_INITIAL (expr);
......
2015-07-14 Andrea Azzarone <azzaronea@gmail.com>
PR c++/65071
* g++.dg/cpp0x/vt-65071.C: New.
2015-07-14 Sandra Loosemore <sandra@codesourcery.com>
Cesar Philippidis <cesar@codesourcery.com>
Chung-Lin Tang <cltang@codesourcery.com>
......
// PR c++/65071
// { dg-do compile { target c++11 } }
template<int> struct S {};
template<template<int> class... T, int N>
S<sizeof...(T)> foo(T<N>...);
auto x = foo(S<2>{});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment