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
This commit is contained in:
Jakub Jelinek 2010-09-15 17:39:57 +02:00 committed by Jakub Jelinek
parent 7dd8ecf0d6
commit 21b6aca3e1
2 changed files with 18 additions and 6 deletions

View File

@ -1,3 +1,9 @@
2010-09-15 Jakub Jelinek <jakub@redhat.com>
PR c++/45635
* class.c (build_vtbl_initializer): Use fn instead of init's operand
as first argument to FDESC_EXPR.
2010-09-15 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/45665

View File

@ -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);