]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/8372 (ICE on explicit call of destructor)
authorMark Mitchell <mark@codesourcery.com>
Tue, 10 Dec 2002 22:32:42 +0000 (22:32 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Tue, 10 Dec 2002 22:32:42 +0000 (22:32 +0000)
PR c++/8372
* pt.c (tsubst_copy): Handle destructor names more correctly.

PR c++/8372
* g++.dg/template/dtor1.C: New test.

From-SVN: r60017

gcc/cp/ChangeLog
gcc/cp/pt.c
gcc/testsuite/ChangeLog

index ca47c07407077d184513b1c59cc726ce0319e8dd..213fc233e072f974206ae41a62031cacc9ad8b16 100644 (file)
@@ -1,3 +1,8 @@
+2002-12-10  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/8372
+       * pt.c (tsubst_copy): Handle destructor names more correctly.
+
 2002-12-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * error.c (dump_expr): Fix format specifier warning.
index 07137c0870dcc3fe5589b9d06f276ea2417ce61c..c6fbff44f9aa75aa2bc7d5d37024d16b4ecf94b3 100644 (file)
@@ -7148,9 +7148,10 @@ tsubst_copy (t, args, complain, in_decl)
          {
            tree base = tsubst_copy (TREE_OPERAND (name, 0), args,
                                     complain, in_decl);
-           name = TREE_OPERAND (name, 1);
-           name = tsubst_copy (TREE_OPERAND (name, 0), args,
-                               complain, in_decl);
+           name = TREE_OPERAND (TREE_OPERAND (name, 1), 0);
+           if (TREE_CODE (name) == TYPE_DECL)
+             name = TREE_TYPE (name);
+           name = tsubst_copy (name, args, complain, in_decl);
            name = build1 (BIT_NOT_EXPR, NULL_TREE, name);
            name = build_nt (SCOPE_REF, base, name);
          }
index 2e3eadce5908df6218db1c5861318297718950e3..f51c90fbb94ee7ea634344220dc8304171d6f190 100644 (file)
@@ -1,3 +1,8 @@
+2002-12-10  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/8372
+       * g++.dg/template/dtor1.C: New test.
+
 2002-12-10  Mark Mitchell  <mark@codesourcery.com>
 
        * g++.old-deja/g++.ext/memconst.C: Use old-deja, not dg, error