http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55792
--- Comment #36 from Richard Biener <rguenth at gcc dot gnu.org> 2013-01-14 13:50:49 UTC --- Or more conservative, dropping less locations: Index: gcc/tree-inline.c =================================================================== --- gcc/tree-inline.c (revision 195144) +++ gcc/tree-inline.c (working copy) @@ -5190,7 +5190,7 @@ tree_function_versioning (tree old_decl, replace_info = (*tree_map)[i]; if (replace_info->replace_p) { - tree op = replace_info->new_tree; + tree op = unshare_expr_without_location (replace_info->new_tree); if (!replace_info->old_tree) { int i = replace_info->parm_num; @@ -5199,18 +5199,10 @@ tree_function_versioning (tree old_decl, i --; replace_info->old_tree = parm; } - - - STRIP_NOPS (op); - - if (TREE_CODE (op) == VIEW_CONVERT_EXPR) - op = TREE_OPERAND (op, 0); - gcc_assert (TREE_CODE (replace_info->old_tree) == PARM_DECL); + init = setup_one_parameter (&id, replace_info->old_tree, - replace_info->new_tree, id.src_fn, - NULL, - &vars); + op, id.src_fn, NULL, &vars); if (init) init_stmts.safe_push (init); }