re PR c++/84611 (ICE in operator[], at vec.h:826 (local_class_index()))
/cp 2018-04-19 Paolo Carlini <paolo.carlini@oracle.com> PR c++/84611 * pt.c (lookup_template_class_1): Check pushtag return value for error_mark_node. /testsuite 2018-04-19 Paolo Carlini <paolo.carlini@oracle.com> PR c++/84611 * g++.dg/parse/crash68.C: New. From-SVN: r259505
This commit is contained in:
parent
5707be3c7d
commit
f62a0ddd73
@ -1,3 +1,9 @@
|
||||
2018-04-19 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/84611
|
||||
* pt.c (lookup_template_class_1): Check pushtag return value for
|
||||
error_mark_node.
|
||||
|
||||
2018-04-19 Alexandre Oliva <aoliva@redhat.com>
|
||||
|
||||
PR c++/80290
|
||||
|
@ -9444,7 +9444,9 @@ lookup_template_class_1 (tree d1, tree arglist, tree in_decl, tree context,
|
||||
|
||||
/* A local class. Make sure the decl gets registered properly. */
|
||||
if (context == current_function_decl)
|
||||
pushtag (DECL_NAME (gen_tmpl), t, /*tag_scope=*/ts_current);
|
||||
if (pushtag (DECL_NAME (gen_tmpl), t, /*tag_scope=*/ts_current)
|
||||
== error_mark_node)
|
||||
return error_mark_node;
|
||||
|
||||
if (comp_template_args (CLASSTYPE_TI_ARGS (template_type), arglist))
|
||||
/* This instantiation is another name for the primary
|
||||
|
@ -1,3 +1,8 @@
|
||||
2018-04-19 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/84611
|
||||
* g++.dg/parse/crash68.C: New.
|
||||
|
||||
2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR libgcc/85334
|
||||
|
18
gcc/testsuite/g++.dg/parse/crash68.C
Normal file
18
gcc/testsuite/g++.dg/parse/crash68.C
Normal file
@ -0,0 +1,18 @@
|
||||
// PR c++/84611
|
||||
|
||||
template<typename = int>
|
||||
struct a {
|
||||
a() {
|
||||
struct c;
|
||||
try {
|
||||
} catch (struct c {}) { // { dg-error "types may not be defined|conflicting" }
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
struct d {
|
||||
d();
|
||||
a<> b;
|
||||
};
|
||||
|
||||
d::d() {}
|
Loading…
Reference in New Issue
Block a user