re PR c++/26957 (ICE in make_decl_rtl, at varasm.c:871)
authorJason Merrill <jason@gcc.gnu.org>
Thu, 7 Sep 2006 21:06:28 +0000 (17:06 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 7 Sep 2006 21:06:28 +0000 (17:06 -0400)
        PR c++/26957
        * method.c (use_thunk): Clear DECL_HAS_VALUE_EXPR_P on copied
        parms.

From-SVN: r116760

gcc/cp/ChangeLog
gcc/cp/method.c
gcc/testsuite/g++.dg/inherit/thunk6.C [new file with mode: 0644]

index 6d59023..06e5fec 100644 (file)
@@ -1,8 +1,14 @@
+2006-09-07  Jason Merrill  <jason@redhat.com>
+
+       PR c++/26957
+       * method.c (use_thunk): Clear DECL_HAS_VALUE_EXPR_P on copied
+       parms.
+
 2006-09-07  Simon Martin  <simartin@users.sourceforge.net>
 
        PR c++/28284
-       * pt.c (fold_non_dependent_expr): Make sure expr is not dereferenced if it
-       is NULL.
+       * pt.c (fold_non_dependent_expr): Make sure expr is not
+       dereferenced if it is NULL.
 
 2006-09-06  Zak Kipling  <zak@transversal.com>
 
index 312e3a9..e2106ff 100644 (file)
@@ -419,6 +419,7 @@ use_thunk (tree thunk_fndecl, bool emit_p)
       TREE_CHAIN (x) = t;
       DECL_CONTEXT (x) = thunk_fndecl;
       SET_DECL_RTL (x, NULL_RTX);
+      DECL_HAS_VALUE_EXPR_P (x) = 0;
       t = x;
     }
   a = nreverse (t);
diff --git a/gcc/testsuite/g++.dg/inherit/thunk6.C b/gcc/testsuite/g++.dg/inherit/thunk6.C
new file mode 100644 (file)
index 0000000..b8e316d
--- /dev/null
@@ -0,0 +1,16 @@
+// PR c++/26957
+
+struct LongDouble {
+    char ld[16];
+};
+
+struct DynAny  {
+    virtual void insert_longdouble(LongDouble value) = 0;
+};
+
+struct TAO_DynCommon : public virtual DynAny {
+    virtual void insert_longdouble (LongDouble value);
+};
+
+void TAO_DynCommon::insert_longdouble (LongDouble value) { }
+