From patchwork Thu Oct 27 21:56:25 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [trans-mem] fixup OBJ_TYPE_REF removable correctly Date: Thu, 27 Oct 2011 11:56:25 -0000 From: Aldy Hernandez X-Patchwork-Id: 122254 Message-Id: <4EA9D389.2010007@redhat.com> To: Richard Henderson , gcc-patches , Torvald Riegel Ho hum, more patches on our way to mergeability. This seems to be more fallout from the last merge. There's an apparent discrepancy between what we think is valid gimple in ipa_tm_insert_gettmclone_call() and what verify_gimple_call() believes is true. This, along with other patches I have queued up, fixes more regressions in g++.dg/tm/. Committed to branch. * trans-mem.c (ipa_tm_insert_gettmclone_call): Use gimple_call_fntype to get function return type. Index: trans-mem.c =================================================================== --- trans-mem.c (revision 180581) +++ trans-mem.c (working copy) @@ -4300,11 +4300,11 @@ ipa_tm_insert_gettmclone_call (struct cg gimple_call_set_fn (stmt, callfn); - /* Discard OBJ_TYPE_REF above, may produce incompatible LHS and RHS + /* Discarding OBJ_TYPE_REF above may produce incompatible LHS and RHS for a call statement. Fix it. */ { tree lhs = gimple_call_lhs (stmt); - tree rettype = TREE_TYPE (TREE_TYPE (TREE_TYPE (callfn))); + tree rettype = TREE_TYPE (gimple_call_fntype (stmt)); if (lhs && !useless_type_conversion_p (TREE_TYPE (lhs), rettype)) {