+2013-04-02 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/56768
+ Backport from mainline
+ 2012-05-16 Richard Guenther <rguenther@suse.de>
+
+ * tree-inline.c (declare_return_variable): Properly handle
+ DECL_BY_REFERENCE return vars in SSA form.
+
2013-04-01 Wei Mi <wmi@google.com>
* config/i386/i386.md (*ashl<mode>3_mask): Rewrite as define_insn.
+2013-04-02 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/56768
+ * g++.dg/torture/pr56768.C: New testcase.
+
2013-04-01 Andrey Belevantsev <abel@ispras.ru>
Backport from mainline
--- /dev/null
+// { dg-do compile }
+// { dg-options "-std=c++0x" }
+
+struct Iter
+{
+ int& operator* ();
+ void operator++ ();
+};
+
+bool operator!= (Iter &, Iter &) { }
+
+struct Container
+{
+ Iter begin () const;
+ Iter end () const;
+};
+
+struct J
+{
+ virtual J *mutable_child ();
+};
+
+struct M
+{
+ M (const Container &);
+ J ns_;
+};
+namespace
+{
+ J MakeNamespace (const Container &src)
+ {
+ J a;
+ J *b = 0;
+ for (const int &c: src)
+ b = b ? b->mutable_child () : &a;
+ return a;
+ }
+}
+M::M (const Container &ns):ns_ (MakeNamespace (ns))
+{
+}
if (gimple_in_ssa_p (id->src_cfun))
add_referenced_var (temp);
insert_decl_map (id, result, temp);
- /* When RESULT_DECL is in SSA form, we need to use it's default_def
- SSA_NAME. */
- if (gimple_in_ssa_p (id->src_cfun) && gimple_default_def (id->src_cfun, result))
- temp = remap_ssa_name (gimple_default_def (id->src_cfun, result), id);
+ /* When RESULT_DECL is in SSA form, we need to remap and initialize
+ it's default_def SSA_NAME. */
+ if (gimple_in_ssa_p (id->src_cfun)
+ && is_gimple_reg (result))
+ {
+ temp = make_ssa_name (temp, NULL);
+ insert_decl_map (id, gimple_default_def (id->src_cfun, result),
+ temp);
+ }
insert_init_stmt (id, entry_bb, gimple_build_assign (temp, var));
}
else