re PR c++/31441 (ICE with variadic template and specialization)
/testsuite 2007-10-11 Paolo Carlini <pcarlini@suse.de> PR c++/31441 * g++.dg/cpp0x/variadic83.C: New. /cp 2007-10-11 Paolo Carlini <pcarlini@suse.de> PR c++/33461 * pt.c (coerce_template_parameter_pack): Do not pass error_mark_node to convert_template_argument. (coerce_template_parms): Return error_mark_node after fixed-length error. (tsubst_decl): Check for error_mark_node the return value of the first tsubst in 'case VAR_DECL'. /testsuite 2007-10-11 Paolo Carlini <pcarlini@suse.de> PR c++/33461 * g++.dg/cpp0x/variadic81.C: New. * g++.dg/cpp0x/variadic82.C: Likewise. From-SVN: r129229
This commit is contained in:
parent
20dcff2aec
commit
c343d5a731
|
@ -1,3 +1,13 @@
|
||||||
|
2007-10-11 Paolo Carlini <pcarlini@suse.de>
|
||||||
|
|
||||||
|
PR c++/33461
|
||||||
|
* pt.c (coerce_template_parameter_pack): Do not pass error_mark_node
|
||||||
|
to convert_template_argument.
|
||||||
|
(coerce_template_parms): Return error_mark_node after fixed-length
|
||||||
|
error.
|
||||||
|
(tsubst_decl): Check for error_mark_node the return value of the
|
||||||
|
first tsubst in 'case VAR_DECL'.
|
||||||
|
|
||||||
2007-10-08 Ollie Wild <aaw@google.com>
|
2007-10-08 Ollie Wild <aaw@google.com>
|
||||||
|
|
||||||
* typeck2.c (digest_init): Call cplus_expand_constant after
|
* typeck2.c (digest_init): Call cplus_expand_constant after
|
||||||
|
|
10
gcc/cp/pt.c
10
gcc/cp/pt.c
|
@ -4933,9 +4933,10 @@ coerce_template_parameter_pack (tree parms,
|
||||||
TREE_VEC_ELT (packed_types, arg_idx - parm_idx);
|
TREE_VEC_ELT (packed_types, arg_idx - parm_idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
arg = convert_template_argument (actual_parm,
|
if (arg != error_mark_node)
|
||||||
arg, new_args, complain, parm_idx,
|
arg = convert_template_argument (actual_parm,
|
||||||
in_decl);
|
arg, new_args, complain, parm_idx,
|
||||||
|
in_decl);
|
||||||
if (arg == error_mark_node)
|
if (arg == error_mark_node)
|
||||||
(*lost)++;
|
(*lost)++;
|
||||||
TREE_VEC_ELT (packed_args, arg_idx - parm_idx) = arg;
|
TREE_VEC_ELT (packed_args, arg_idx - parm_idx) = arg;
|
||||||
|
@ -5086,6 +5087,7 @@ coerce_template_parms (tree parms,
|
||||||
else
|
else
|
||||||
error ("cannot expand %<%T%> into a fixed-length "
|
error ("cannot expand %<%T%> into a fixed-length "
|
||||||
"argument list", arg);
|
"argument list", arg);
|
||||||
|
return error_mark_node;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (require_all_args)
|
else if (require_all_args)
|
||||||
|
@ -8087,6 +8089,8 @@ tsubst_decl (tree t, tree args, tsubst_flags_t complain)
|
||||||
TYPE_NAME is not correct for the above test if
|
TYPE_NAME is not correct for the above test if
|
||||||
we've copied the type for a typedef. */
|
we've copied the type for a typedef. */
|
||||||
type = tsubst (TREE_TYPE (t), args, complain, in_decl);
|
type = tsubst (TREE_TYPE (t), args, complain, in_decl);
|
||||||
|
if (type == error_mark_node)
|
||||||
|
return error_mark_node;
|
||||||
r = TYPE_NAME (type);
|
r = TYPE_NAME (type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,14 @@
|
||||||
|
2007-10-11 Paolo Carlini <pcarlini@suse.de>
|
||||||
|
|
||||||
|
PR c++/31441
|
||||||
|
* g++.dg/cpp0x/variadic83.C: New.
|
||||||
|
|
||||||
|
2007-10-11 Paolo Carlini <pcarlini@suse.de>
|
||||||
|
|
||||||
|
PR c++/33461
|
||||||
|
* g++.dg/cpp0x/variadic81.C: New.
|
||||||
|
* g++.dg/cpp0x/variadic82.C: Likewise.
|
||||||
|
|
||||||
2007-10-11 Richard Guenther <rguenther@suse.de>
|
2007-10-11 Richard Guenther <rguenther@suse.de>
|
||||||
|
|
||||||
PR middle-end/33724
|
PR middle-end/33724
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
// PR c++/33461
|
||||||
|
// { dg-options "-std=gnu++0x" }
|
||||||
|
|
||||||
|
template<typename> struct A;
|
||||||
|
|
||||||
|
template<typename... T> struct A<T*> // { dg-error "not expanded|note" }
|
||||||
|
{ // { dg-error "not expanded|note" }
|
||||||
|
struct B;
|
||||||
|
};
|
||||||
|
|
||||||
|
A<void*> a;
|
|
@ -0,0 +1,11 @@
|
||||||
|
// PR c++/33461
|
||||||
|
// { dg-options "-std=gnu++0x" }
|
||||||
|
|
||||||
|
template<typename> struct A;
|
||||||
|
|
||||||
|
template<typename... T> struct A<T*...> // { dg-error "cannot expand" }
|
||||||
|
{
|
||||||
|
struct B;
|
||||||
|
};
|
||||||
|
|
||||||
|
A<void*> a; // { dg-error "incomplete type" }
|
|
@ -0,0 +1,8 @@
|
||||||
|
// PR c++/31441
|
||||||
|
// { dg-options "-std=gnu++0x" }
|
||||||
|
|
||||||
|
template<typename> struct A;
|
||||||
|
|
||||||
|
template<typename... T> struct A<T...> { }; // { dg-error "cannot expand" }
|
||||||
|
|
||||||
|
A<int> a; // { dg-error "incomplete type" }
|
Loading…
Reference in New Issue