mirror of git://gcc.gnu.org/git/gcc.git
re PR c++/63309 (internal compiler error: Segmentation fault)
PR c++/63309 * parser.c (cp_parser_class_head): push_template_decl for members of templates, too. From-SVN: r216044
This commit is contained in:
parent
5d4fffb822
commit
ea4e4e6e2f
|
|
@ -1,5 +1,9 @@
|
||||||
2014-10-09 Jason Merrill <jason@redhat.com>
|
2014-10-09 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
PR c++/63309
|
||||||
|
* parser.c (cp_parser_class_head): push_template_decl for members
|
||||||
|
of templates, too.
|
||||||
|
|
||||||
PR c++/63415
|
PR c++/63415
|
||||||
* pt.c (value_dependent_expression_p) [CONSTRUCTOR]: Check the type.
|
* pt.c (value_dependent_expression_p) [CONSTRUCTOR]: Check the type.
|
||||||
(iterative_hash_template_arg): Likewise.
|
(iterative_hash_template_arg): Likewise.
|
||||||
|
|
|
||||||
|
|
@ -20222,9 +20222,7 @@ cp_parser_class_head (cp_parser* parser,
|
||||||
template either from the template headers or the type we're
|
template either from the template headers or the type we're
|
||||||
defining, so that we diagnose both extra and missing headers. */
|
defining, so that we diagnose both extra and missing headers. */
|
||||||
if ((PROCESSING_REAL_TEMPLATE_DECL_P ()
|
if ((PROCESSING_REAL_TEMPLATE_DECL_P ()
|
||||||
|| (CLASSTYPE_TEMPLATE_INFO (TREE_TYPE (type))
|
|| CLASSTYPE_TEMPLATE_INFO (TREE_TYPE (type)))
|
||||||
&& PRIMARY_TEMPLATE_P (CLASSTYPE_TI_TEMPLATE
|
|
||||||
(TREE_TYPE (type)))))
|
|
||||||
&& !CLASSTYPE_TEMPLATE_SPECIALIZATION (TREE_TYPE (type)))
|
&& !CLASSTYPE_TEMPLATE_SPECIALIZATION (TREE_TYPE (type)))
|
||||||
{
|
{
|
||||||
type = push_template_decl (type);
|
type = push_template_decl (type);
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
// PR c++/63309
|
||||||
|
|
||||||
|
template <class T>
|
||||||
|
class A
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
class B;
|
||||||
|
};
|
||||||
|
|
||||||
|
template <class T, class I>
|
||||||
|
class A<T>::B // { dg-error "template parameters|required" }
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
A<int>::B myB; // { dg-prune-output "incomplete type" }
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue