aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/class.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2010-09-15 17:39:57 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2010-09-15 17:39:57 +0200
commit21b6aca3e1df3b774a2895c0d43d9397a2ff4ba0 (patch)
tree912c218b4e2687d0488eb311336d84bf91fed505 /gcc/cp/class.c
parent7dd8ecf0d6072eaa84c01d3cdd358eff03c2d673 (diff)
downloadgcc-21b6aca3e1df3b774a2895c0d43d9397a2ff4ba0.zip
gcc-21b6aca3e1df3b774a2895c0d43d9397a2ff4ba0.tar.gz
gcc-21b6aca3e1df3b774a2895c0d43d9397a2ff4ba0.tar.bz2
re PR c++/45635 (Failed to bootstrap on Linux/ia64)
PR c++/45635 * class.c (build_vtbl_initializer): Use fn instead of init's operand as first argument to FDESC_EXPR. From-SVN: r164311
Diffstat (limited to 'gcc/cp/class.c')
-rw-r--r--gcc/cp/class.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 4823fa2..c594d6a 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -7796,9 +7796,14 @@ build_vtbl_initializer (tree binfo,
if (DECL_PURE_VIRTUAL_P (fn_original))
{
fn = abort_fndecl;
- if (abort_fndecl_addr == NULL)
- abort_fndecl_addr = fold_convert (vfunc_ptr_type_node, build_fold_addr_expr (fn));
- init = abort_fndecl_addr;
+ if (!TARGET_VTABLE_USES_DESCRIPTORS)
+ {
+ if (abort_fndecl_addr == NULL)
+ abort_fndecl_addr
+ = fold_convert (vfunc_ptr_type_node,
+ build_fold_addr_expr (fn));
+ init = abort_fndecl_addr;
+ }
}
else
{
@@ -7810,7 +7815,9 @@ build_vtbl_initializer (tree binfo,
}
/* Take the address of the function, considering it to be of an
appropriate generic type. */
- init = fold_convert (vfunc_ptr_type_node, build_fold_addr_expr (fn));
+ if (!TARGET_VTABLE_USES_DESCRIPTORS)
+ init = fold_convert (vfunc_ptr_type_node,
+ build_fold_addr_expr (fn));
}
}
@@ -7825,8 +7832,7 @@ build_vtbl_initializer (tree binfo,
for (i = 0; i < TARGET_VTABLE_USES_DESCRIPTORS; ++i)
{
tree fdesc = build2 (FDESC_EXPR, vfunc_ptr_type_node,
- TREE_OPERAND (init, 0),
- build_int_cst (NULL_TREE, i));
+ fn, build_int_cst (NULL_TREE, i));
TREE_CONSTANT (fdesc) = 1;
CONSTRUCTOR_APPEND_ELT (*inits, NULL_TREE, fdesc);