+2016-07-13 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/71104
+ * gimplify.c (gimplify_modify_expr): Gimplify the RHS before
+ gimplifying the LHS. Make sure to gimplify a returning twice
+ call LHS without using SSA names.
+
2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* tree-data-ref.c (find_data_references_in_stmt): Remove
return ret;
/* Then gimplify the LHS. */
+ /* If we gimplified the RHS to a CALL_EXPR and that call may return
+ twice we have to make sure to gimplify into non-SSA as otherwise
+ the abnormal edge added later will make those defs not dominate
+ their uses.
+ ??? Technically this applies only to the registers used in the
+ resulting non-register *TO_P. */
+ bool saved_into_ssa = gimplify_ctxp->into_ssa;
+ if (saved_into_ssa
+ && TREE_CODE (*from_p) == CALL_EXPR
+ && call_expr_flags (*from_p) & ECF_RETURNS_TWICE)
+ gimplify_ctxp->into_ssa = false;
ret = gimplify_expr (to_p, pre_p, post_p, is_gimple_lvalue, fb_lvalue);
+ gimplify_ctxp->into_ssa = saved_into_ssa;
if (ret == GS_ERROR)
return ret;
+2016-07-13 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/71104
+ * gcc.dg/pr71104-1.c: New testcase.
+ * gcc.dg/pr71104-2.c: Likewise.
+
2016-07-12 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/71805