aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@yorick.cygnus.com>1997-09-01 21:01:30 +0000
committerJason Merrill <jason@gcc.gnu.org>1997-09-01 17:01:30 -0400
commit7e3af3746e4d4a93f833ee8311ef2ffba1996c5e (patch)
tree4461dd0f20cc90fb2a7d90ff092f0d221d2c5077
parent8e69329a82c45a31e84ef3698ad3e7cbfca1c3a9 (diff)
downloadgcc-7e3af3746e4d4a93f833ee8311ef2ffba1996c5e.zip
gcc-7e3af3746e4d4a93f833ee8311ef2ffba1996c5e.tar.gz
gcc-7e3af3746e4d4a93f833ee8311ef2ffba1996c5e.tar.bz2
call.c (build_new_op): Strip leading REF_BIND from first operand to builtin operator.
* call.c (build_new_op): Strip leading REF_BIND from first operand to builtin operator. * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we use its RTL. From-SVN: r15023
-rw-r--r--gcc/cp/ChangeLog8
-rw-r--r--gcc/cp/call.c10
-rw-r--r--gcc/cp/decl2.c1
3 files changed, 17 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 472affb..46ede96 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,11 @@
+Mon Sep 1 13:19:04 1997 Jason Merrill <jason@yorick.cygnus.com>
+
+ * call.c (build_new_op): Strip leading REF_BIND from first operand
+ to builtin operator.
+
+ * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
+ use its RTL.
+
Thu Aug 28 09:45:23 1997 Jason Merrill <jason@yorick.cygnus.com>
* call.c (null_ptr_cst_p): Remove support for (void*)0.
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index 26319f6..c6b2884 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -4579,6 +4579,7 @@ build_new_op (code, flags, arg1, arg2, arg3)
tree fns, mem_arglist, arglist, fnname;
enum tree_code code2 = NOP_EXPR;
tree templates = NULL_TREE;
+ tree conv;
if (arg1 == error_mark_node
|| arg2 == error_mark_node
@@ -4860,8 +4861,13 @@ build_new_op (code, flags, arg1, arg2, arg3)
}
}
- arg1 = convert_from_reference
- (convert_like (TREE_VEC_ELT (cand->convs, 0), arg1));
+ /* We need to strip any leading REF_BIND so that bitfields don't cause
+ errors. This should not remove any important conversions, because
+ builtins don't apply to class objects directly. */
+ conv = TREE_VEC_ELT (cand->convs, 0);
+ if (TREE_CODE (conv) == REF_BIND)
+ conv = TREE_OPERAND (conv, 0);
+ arg1 = convert_like (conv, arg1);
if (arg2)
arg2 = convert_like (TREE_VEC_ELT (cand->convs, 1), arg2);
if (arg3)
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 701489e..a8975ec 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -2343,6 +2343,7 @@ mark_vtable_entries (decl)
{
TREE_OPERAND (fnaddr, 0) = fn = copy_node (fn);
DECL_RTL (fn) = DECL_RTL (abort_fndecl);
+ mark_used (abort_fndecl);
}
if (TREE_CODE (fn) == THUNK_DECL && DECL_EXTERNAL (fn))
{