and during the instantiation of template functions.
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
- 2008, 2009 Free Software Foundation, Inc.
+ 2008, 2009, 2010 Free Software Foundation, Inc.
Written by Mark Mitchell (mmitchell@usa.net) based on code found
formerly in parse.y and pt.c.
otherwise we'll get an error. Gross, but ... */
STRIP_NOPS (operand);
+ operand = mark_lvalue_use (operand);
+
if (!lvalue_or_else (operand, lv_asm, tf_warning_or_error))
operand = error_mark_node;
if (!cl)
cl = DECL_CONTEXT (fn);
cl = TYPE_BINFO (cl);
- return build_baselink (TYPE_BINFO (DECL_CONTEXT (fn)), cl, fns,
- /*optype=*/NULL_TREE);
+ return build_baselink (cl, cl, fns, /*optype=*/NULL_TREE);
}
/* Returns true iff DECL is an automatic variable from a function outside
return type;
}
+ expr = mark_type_use (expr);
+
type = unlowered_expr_type (expr);
if (!type || type == unknown_type_node)
}
if (TREE_CODE (TREE_TYPE (expr)) == FUNCTION_TYPE
|| TREE_CODE (TREE_TYPE (expr)) == METHOD_TYPE
- || TREE_CODE (TREE_TYPE (expr)) == UNKNOWN_TYPE)
+ || TREE_TYPE (expr) == unknown_type_node)
{
if (TREE_CODE (expr) == COMPONENT_REF
|| TREE_CODE (expr) == COMPOUND_EXPR)
expand_call{,_inline}. */
cxx_mark_addressable (slot);
CALL_EXPR_RETURN_SLOT_OPT (call_expr) = true;
- call_expr = build2 (MODIFY_EXPR, TREE_TYPE (call_expr), slot, call_expr);
+ call_expr = build2 (INIT_EXPR, TREE_TYPE (call_expr), slot, call_expr);
}
else if (style == pcc)
{
case PARM_DECL:
case RESULT_DECL:
case TEMPLATE_PARM_INDEX:
+ expr = mark_type_use (expr);
type = TREE_TYPE (expr);
break;
break;
case COMPONENT_REF:
+ mark_type_use (expr);
type = is_bitfield_expr_with_lowered_type (expr);
if (!type)
type = TREE_TYPE (TREE_OPERAND (expr, 1));
start_preparsed_function (convfn, NULL_TREE,
SF_PRE_PARSED | SF_INCLASS_INLINE);
+ if (DECL_ONE_ONLY (statfn))
+ {
+ /* Put the thunk in the same comdat group as the call op. */
+ struct cgraph_node *callop_node, *thunk_node;
+ DECL_COMDAT_GROUP (statfn) = DECL_COMDAT_GROUP (callop);
+ callop_node = cgraph_node (callop);
+ thunk_node = cgraph_node (statfn);
+ gcc_assert (callop_node->same_comdat_group == NULL);
+ gcc_assert (thunk_node->same_comdat_group == NULL);
+ callop_node->same_comdat_group = thunk_node;
+ thunk_node->same_comdat_group = callop_node;
+ }
body = begin_function_body ();
compound_stmt = begin_compound_stmt (0);