Commit 21b6aca3 by Jakub Jelinek Committed by Jakub Jelinek

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
parent 7dd8ecf0
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> 2010-09-15 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/45665 PR c++/45665
......
...@@ -7796,9 +7796,14 @@ build_vtbl_initializer (tree binfo, ...@@ -7796,9 +7796,14 @@ build_vtbl_initializer (tree binfo,
if (DECL_PURE_VIRTUAL_P (fn_original)) if (DECL_PURE_VIRTUAL_P (fn_original))
{ {
fn = abort_fndecl; fn = abort_fndecl;
if (abort_fndecl_addr == NULL) if (!TARGET_VTABLE_USES_DESCRIPTORS)
abort_fndecl_addr = fold_convert (vfunc_ptr_type_node, build_fold_addr_expr (fn)); {
init = abort_fndecl_addr; if (abort_fndecl_addr == NULL)
abort_fndecl_addr
= fold_convert (vfunc_ptr_type_node,
build_fold_addr_expr (fn));
init = abort_fndecl_addr;
}
} }
else else
{ {
...@@ -7810,7 +7815,9 @@ build_vtbl_initializer (tree binfo, ...@@ -7810,7 +7815,9 @@ build_vtbl_initializer (tree binfo,
} }
/* Take the address of the function, considering it to be of an /* Take the address of the function, considering it to be of an
appropriate generic type. */ 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, ...@@ -7825,8 +7832,7 @@ build_vtbl_initializer (tree binfo,
for (i = 0; i < TARGET_VTABLE_USES_DESCRIPTORS; ++i) for (i = 0; i < TARGET_VTABLE_USES_DESCRIPTORS; ++i)
{ {
tree fdesc = build2 (FDESC_EXPR, vfunc_ptr_type_node, tree fdesc = build2 (FDESC_EXPR, vfunc_ptr_type_node,
TREE_OPERAND (init, 0), fn, build_int_cst (NULL_TREE, i));
build_int_cst (NULL_TREE, i));
TREE_CONSTANT (fdesc) = 1; TREE_CONSTANT (fdesc) = 1;
CONSTRUCTOR_APPEND_ELT (*inits, NULL_TREE, fdesc); CONSTRUCTOR_APPEND_ELT (*inits, NULL_TREE, fdesc);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment