re PR c++/47971 (ICE: in tsubst_copy, at cp/pt.c:11725 on valid code)
PR c++/47971 * pt.c (tsubst_copy_and_build) [PSEUDO_DTOR_EXPR]: Use tsubst for type. (tsubst_copy) [default]: Just return t if !ENABLE_CHECKING. From-SVN: r170677
This commit is contained in:
parent
38ffa8289c
commit
ad00b8db9a
@ -1,5 +1,9 @@
|
||||
2011-03-04 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/47971
|
||||
* pt.c (tsubst_copy_and_build) [PSEUDO_DTOR_EXPR]: Use tsubst for type.
|
||||
(tsubst_copy) [default]: Just return t if !ENABLE_CHECKING.
|
||||
|
||||
PR c++/46220
|
||||
* search.c (check_final_overrider): Allow pointer to same incomplete
|
||||
class type with different cv-quals.
|
||||
|
@ -11727,7 +11727,9 @@ tsubst_copy (tree t, tree args, tsubst_flags_t complain, tree in_decl)
|
||||
return t;
|
||||
|
||||
default:
|
||||
gcc_unreachable ();
|
||||
/* We shouldn't get here, but keep going if !ENABLE_CHECKING. */
|
||||
gcc_checking_assert (false);
|
||||
return t;
|
||||
}
|
||||
}
|
||||
|
||||
@ -12984,7 +12986,7 @@ tsubst_copy_and_build (tree t,
|
||||
return finish_pseudo_destructor_expr
|
||||
(RECUR (TREE_OPERAND (t, 0)),
|
||||
RECUR (TREE_OPERAND (t, 1)),
|
||||
RECUR (TREE_OPERAND (t, 2)));
|
||||
tsubst (TREE_OPERAND (t, 2), args, complain, in_decl));
|
||||
|
||||
case TREE_LIST:
|
||||
{
|
||||
|
@ -1,5 +1,7 @@
|
||||
2011-03-04 Jason Merrill <jason@redhat.com>
|
||||
|
||||
* g++.dg/template/pseudodtor6.C: New.
|
||||
|
||||
* g++.dg/inherit/covariant19.C: New.
|
||||
|
||||
2011-03-04 Richard Guenther <rguenther@suse.de>
|
||||
|
9
gcc/testsuite/g++.dg/template/pseudodtor6.C
Normal file
9
gcc/testsuite/g++.dg/template/pseudodtor6.C
Normal file
@ -0,0 +1,9 @@
|
||||
// PR c++/47971
|
||||
|
||||
template <typename> struct S
|
||||
{
|
||||
typedef double T;
|
||||
S () { T ().~T (); }
|
||||
};
|
||||
|
||||
S<double> s;
|
Loading…
Reference in New Issue
Block a user