re PR c++/40139 (ICE on invalid use of destructor)
authorJason Merrill <jason@redhat.com>
Sun, 17 May 2009 18:01:33 +0000 (14:01 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Sun, 17 May 2009 18:01:33 +0000 (14:01 -0400)
commit7e361ae60a7b275571bba267b2354b72df40c99a
tree097a2b317a3f015b864632a6294fe207c4fd91d4
parent8fa6fa79177806a38422c7c13a29a8fc12e38bf3
re PR c++/40139 (ICE on invalid use of destructor)

PR c++/40139
* pt.c (tsubst_qualified_id): Retain the type if we aren't dealing
with a dependent type.  Actually look up the destructor.
* semantics.c (finish_id_expression): Fix logic.
(finish_qualified_id_expr): Don't try to use 'this' if we aren't in
a function.
* typeck.c (build_x_unary_op): Diagnose taking the address of a
constructor or destructor.
* tree.c (get_first_fn): Handle OFFSET_REF.

From-SVN: r147638
gcc/cp/ChangeLog
gcc/cp/pt.c
gcc/cp/semantics.c
gcc/cp/tree.c
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/template/dtor6.C [new file with mode: 0644]