+2011-12-02 Martin Jambor <mjambor@suse.cz>
+
+ PR tree-optimization/50622
+ * tree-sra.c (load_assign_lhs_subreplacements): Force gimple operand
+ if both lacc and racc are grp_partial_lhs.
+
2011-12-01 Kaz Kojima <kkojima@gcc.gnu.org>
PR target/50814.
+2011-12-02 Martin Jambor <mjambor@suse.cz>
+
+ PR tree-optimization/50622
+ * g++.dg/tree-ssa/pr50622.C: New test.
+
2011-12-01 Jason Merrill <jason@redhat.com>
* g++.dg/cpp0x/initlist61.C: New.
--- /dev/null
+// { dg-do compile }
+// { dg-options "-O2" }
+
+typedef __complex__ double Value;
+struct LorentzVector
+{
+ LorentzVector & operator+=(const LorentzVector & a) {
+ theX += a.theX;
+ theY += a.theY;
+ theZ += a.theZ;
+ theT += a.theT;
+ return *this;
+ }
+
+ Value theX;
+ Value theY;
+ Value theZ;
+ Value theT;
+};
+
+inline LorentzVector
+operator+(LorentzVector a, const LorentzVector & b) {
+ return a += b;
+}
+
+Value ex, et;
+LorentzVector sum() {
+ LorentzVector v1; v1.theX =ex; v1.theY =ex+et; v1.theZ =ex-et; v1.theT =et;
+ return v1+v1;
+}
rhs = get_access_replacement (racc);
if (!useless_type_conversion_p (lacc->type, racc->type))
rhs = fold_build1_loc (loc, VIEW_CONVERT_EXPR, lacc->type, rhs);
+
+ if (racc->grp_partial_lhs && lacc->grp_partial_lhs)
+ rhs = force_gimple_operand_gsi (old_gsi, rhs, true, NULL_TREE,
+ true, GSI_SAME_STMT);
}
else
{