@@ -1316,6 +1316,7 @@ build_aggr_init (tree exp, tree init, int flags, tsubst_flags_t complain)
/* Just know that we've seen something for this node. */
TREE_USED (exp) = 1;
+ TREE_TYPE (exp) = TYPE_MAIN_VARIANT (type);
is_global = begin_init_stmts (&stmt_expr, &compound_stmt);
destroy_temps = stmts_are_full_exprs_p ();
current_stmt_tree ()->stmts_are_full_exprs_p = 0;
@@ -0,0 +1,17 @@
+struct Region {
+ int storage[4];
+ int count;
+};
+static inline Region subtract(int lhs)
+{
+ Region reg;
+ int* storage = reg.storage;
+ if (lhs > 0)
+ storage++;
+ reg.count = storage - reg.storage;
+ return reg;
+}
+void bar(int a)
+{
+ const Region copyBack(subtract(a));
+}