aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@gcc.gnu.org>2006-09-07 17:06:28 -0400
committerJason Merrill <jason@gcc.gnu.org>2006-09-07 17:06:28 -0400
commitdbb87a8ade99d5a316b5091cd866dc6c66e26f53 (patch)
tree85dc230c70ec0a8d0a37e73ede8d2eac2c6481ee
parent94fbfc650b2837bd3f24e786fbe88ad9d73e216c (diff)
downloadgcc-dbb87a8ade99d5a316b5091cd866dc6c66e26f53.zip
gcc-dbb87a8ade99d5a316b5091cd866dc6c66e26f53.tar.gz
gcc-dbb87a8ade99d5a316b5091cd866dc6c66e26f53.tar.bz2
re PR c++/26957 (ICE in make_decl_rtl, at varasm.c:871)
PR c++/26957 * method.c (use_thunk): Clear DECL_HAS_VALUE_EXPR_P on copied parms. From-SVN: r116760
-rw-r--r--gcc/cp/ChangeLog10
-rw-r--r--gcc/cp/method.c1
-rw-r--r--gcc/testsuite/g++.dg/inherit/thunk6.C16
3 files changed, 25 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 6d59023..06e5fec 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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>
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index 312e3a9..e2106ff 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -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
index 0000000..b8e316d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/inherit/thunk6.C
@@ -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) { }
+