+ tree slot;
+ tree inner_type = strip_array_types (type);
+ tree elt_init = integer_zero_node;
+ bool value_init = false;
+
+ /* Since we're deferring building the actual constructor calls until
+ gimplification time, we need to build one now and throw it away so
+ that the relevant constructor gets mark_used before cgraph decides
+ what functions are needed. Here we assume that init is either
+ NULL_TREE, void_type_node (indicating value-initialization), or
+ another array to copy. */
+ if (integer_zerop (array_type_nelts_total (type)))
+ {
+ /* No actual initialization to do. */;
+ init = NULL_TREE;
+ }
+ else if (init == void_type_node)
+ {
+ elt_init = build_value_init (inner_type, tf_warning_or_error);
+ value_init = true;
+ init = NULL_TREE;
+ }
+ else
+ {
+ gcc_assert (init == NULL_TREE
+ || (same_type_ignoring_top_level_qualifiers_p
+ (type, TREE_TYPE (init))));
+
+ if (CLASS_TYPE_P (inner_type))
+ {
+ VEC(tree,gc) *argvec = make_tree_vector ();
+ if (init)
+ {
+ tree dummy = build_dummy_object (inner_type);
+ if (!real_lvalue_p (init))
+ dummy = move (dummy);
+ VEC_quick_push (tree, argvec, dummy);
+ }
+ elt_init
+ = build_special_member_call (NULL_TREE, complete_ctor_identifier,
+ &argvec, inner_type, LOOKUP_NORMAL,
+ tf_warning_or_error);
+ }
+ }
+
+ slot = build_local_temp (type);