mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-23 06:49:11 +08:00
re PR c++/37649 (ICE with invalid template class)
/cp 2008-09-25 Paolo Carlini <paolo.carlini@oracle.com> PR c++/37649 * name-lookup.c (maybe_process_template_type_declaration): Check return value of push_template_decl_real for error_mark_node. /testsuite 2008-09-25 Paolo Carlini <paolo.carlini@oracle.com> PR c++/37649 * g++.dg/template/crash82.C: New. From-SVN: r140670
This commit is contained in:
parent
6ffef2ad23
commit
79faac542c
@ -1,3 +1,9 @@
|
||||
2008-09-25 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/37649
|
||||
* name-lookup.c (maybe_process_template_type_declaration): Check
|
||||
return value of push_template_decl_real for error_mark_node.
|
||||
|
||||
2008-09-24 Aldy Hernandez <aldyh@redhat.com>
|
||||
|
||||
* semantics.c (finish_fname): Pass location to fname_decl.
|
||||
|
@ -4936,6 +4936,9 @@ maybe_process_template_type_declaration (tree type, int is_friend,
|
||||
tree name = DECL_NAME (decl);
|
||||
|
||||
decl = push_template_decl_real (decl, is_friend);
|
||||
if (decl == error_mark_node)
|
||||
return error_mark_node;
|
||||
|
||||
/* If the current binding level is the binding level for the
|
||||
template parameters (see the comment in
|
||||
begin_template_parm_list) and the enclosing level is a class
|
||||
|
@ -1,3 +1,8 @@
|
||||
2008-09-25 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/37649
|
||||
* g++.dg/template/crash82.C: New.
|
||||
|
||||
2008-09-25 Tobias Burnus <burnus@net-b.de>
|
||||
|
||||
PR fortran/37504
|
||||
|
6
gcc/testsuite/g++.dg/template/crash82.C
Normal file
6
gcc/testsuite/g++.dg/template/crash82.C
Normal file
@ -0,0 +1,6 @@
|
||||
// PR c++/37649
|
||||
|
||||
struct A
|
||||
{
|
||||
template<int> struct {}; // { dg-error "template class without a name" }
|
||||
};
|
Loading…
Reference in New Issue
Block a user