re PR c++/60383 (ICE with invalid template specialization)
/cp 2014-03-13 Paolo Carlini <paolo.carlini@oracle.com> PR c++/60383 * pt.c (maybe_process_partial_specialization): Check return value of check_specialization_namespace. /testsuite 2014-03-13 Paolo Carlini <paolo.carlini@oracle.com> PR c++/60383 * g++.dg/template/crash118.C: New. * g++.dg/template/crash95.C: Adjust. From-SVN: r208550
This commit is contained in:
parent
7891065aa7
commit
b0a8740278
5 changed files with 27 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2014-03-13 Paolo Carlini <paolo.carlini@oracle.com>
|
||||||
|
|
||||||
|
PR c++/60383
|
||||||
|
* pt.c (maybe_process_partial_specialization): Check return value
|
||||||
|
of check_specialization_namespace.
|
||||||
|
|
||||||
2014-03-13 Paolo Carlini <paolo.carlini@oracle.com>
|
2014-03-13 Paolo Carlini <paolo.carlini@oracle.com>
|
||||||
|
|
||||||
PR c++/60254
|
PR c++/60254
|
||||||
|
|
|
@ -850,7 +850,9 @@ maybe_process_partial_specialization (tree type)
|
||||||
if (CLASSTYPE_IMPLICIT_INSTANTIATION (type)
|
if (CLASSTYPE_IMPLICIT_INSTANTIATION (type)
|
||||||
&& !COMPLETE_TYPE_P (type))
|
&& !COMPLETE_TYPE_P (type))
|
||||||
{
|
{
|
||||||
check_specialization_namespace (CLASSTYPE_TI_TEMPLATE (type));
|
if (!check_specialization_namespace (CLASSTYPE_TI_TEMPLATE (type))
|
||||||
|
&& !at_namespace_scope_p ())
|
||||||
|
return error_mark_node;
|
||||||
SET_CLASSTYPE_TEMPLATE_SPECIALIZATION (type);
|
SET_CLASSTYPE_TEMPLATE_SPECIALIZATION (type);
|
||||||
DECL_SOURCE_LOCATION (TYPE_MAIN_DECL (type)) = input_location;
|
DECL_SOURCE_LOCATION (TYPE_MAIN_DECL (type)) = input_location;
|
||||||
if (processing_template_decl)
|
if (processing_template_decl)
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
2014-03-13 Paolo Carlini <paolo.carlini@oracle.com>
|
||||||
|
|
||||||
|
PR c++/60383
|
||||||
|
* g++.dg/template/crash118.C: New.
|
||||||
|
* g++.dg/template/crash95.C: Adjust.
|
||||||
|
|
||||||
2014-03-13 Vladimir Makarov <vmakarov@redhat.com>
|
2014-03-13 Vladimir Makarov <vmakarov@redhat.com>
|
||||||
|
|
||||||
PR rtl-optimization/57189
|
PR rtl-optimization/57189
|
||||||
|
|
11
gcc/testsuite/g++.dg/template/crash118.C
Normal file
11
gcc/testsuite/g++.dg/template/crash118.C
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
// PR c++/60383
|
||||||
|
|
||||||
|
template<int> struct A
|
||||||
|
{
|
||||||
|
template<typename> struct B
|
||||||
|
{
|
||||||
|
template<typename T> struct B<T*> {}; // { dg-error "specialization" }
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
A<0>::B<char*> b;
|
|
@ -8,4 +8,4 @@ template < typename > struct S
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
S < int > s(0); // { dg-error "incomplete type" }
|
S < int > s(0); // { dg-error "no matching" }
|
||||||
|
|
Loading…
Add table
Reference in a new issue