------- Comment #1 from jamborm at gcc dot gnu dot org 2008-08-07 10:11 ------- I am testing the patch below which should fix the problem:
2008-08-07 Martin Jambor <[EMAIL PROTECTED]> * tree-inline.c (remap_gimple_stmt): Remove extraneous addr_expr from call statements. Index: iinln/gcc/tree-inline.c =================================================================== --- iinln.orig/gcc/tree-inline.c +++ iinln/gcc/tree-inline.c @@ -1209,6 +1209,14 @@ remap_gimple_stmt (gimple stmt, copy_bod wi.info = id; walk_gimple_op (copy, remap_gimple_op_r, &wi); + /* When a parameter is propagated into a call destination, it is in the form + of call<addr_expr<fndecl>> which gimple_call_fndecl does not understand. + Therefore we need to take the extra addr_expr out here. */ + if (is_gimple_call (copy) + && TREE_CODE (gimple_call_fn (copy)) == ADDR_EXPR + && TREE_CODE (TREE_OPERAND (gimple_call_fn (copy), 0)) == FUNCTION_DECL) + gimple_call_set_fn (copy, TREE_OPERAND (gimple_call_fn (copy), 0)); + /* We have to handle EH region remapping of GIMPLE_RESX specially because the region number is not an operand. */ if (gimple_code (stmt) == GIMPLE_RESX && id->eh_region_offset) -- jamborm at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2008-08-07 10:11:37 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37046