re PR c++/58649 (ICE with use of enum before declaration)
/cp 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com> PR c++/58649 * pt.c (lookup_template_class_1): Check start_enum return value for error_mark_node. /testsuite 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com> PR c++/58649 * g++.dg/template/crash117.C: New. From-SVN: r207304
This commit is contained in:
parent
cc27b5cd86
commit
e1b317aecf
@ -1,3 +1,9 @@
|
|||||||
|
2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
|
||||||
|
|
||||||
|
PR c++/58649
|
||||||
|
* pt.c (lookup_template_class_1): Check start_enum return value
|
||||||
|
for error_mark_node.
|
||||||
|
|
||||||
2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
|
2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
|
||||||
|
|
||||||
* decl.c (duplicate_decls, typename_hash, typename_compare):
|
* decl.c (duplicate_decls, typename_hash, typename_compare):
|
||||||
|
@ -7521,6 +7521,9 @@ lookup_template_class_1 (tree d1, tree arglist, tree in_decl, tree context,
|
|||||||
tsubst (ENUM_UNDERLYING_TYPE (template_type),
|
tsubst (ENUM_UNDERLYING_TYPE (template_type),
|
||||||
arglist, complain, in_decl),
|
arglist, complain, in_decl),
|
||||||
SCOPED_ENUM_P (template_type), NULL);
|
SCOPED_ENUM_P (template_type), NULL);
|
||||||
|
|
||||||
|
if (t == error_mark_node)
|
||||||
|
return t;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
|
||||||
|
|
||||||
|
PR c++/58649
|
||||||
|
* g++.dg/template/crash117.C: New.
|
||||||
|
|
||||||
2014-01-30 Richard Biener <rguenther@suse.de>
|
2014-01-30 Richard Biener <rguenther@suse.de>
|
||||||
|
|
||||||
PR c/59905
|
PR c/59905
|
||||||
|
9
gcc/testsuite/g++.dg/template/crash117.C
Normal file
9
gcc/testsuite/g++.dg/template/crash117.C
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
// PR c++/58649
|
||||||
|
|
||||||
|
template<typename> void foo()
|
||||||
|
{
|
||||||
|
E(); // { dg-error "declaration|declared" }
|
||||||
|
enum E {};
|
||||||
|
}
|
||||||
|
|
||||||
|
template void foo<int>();
|
Loading…
Reference in New Issue
Block a user