aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
authorTom de Vries <tom@codesourcery.com>2015-04-28 20:58:51 +0000
committerTom de Vries <vries@gcc.gnu.org>2015-04-28 20:58:51 +0000
commitecd0e562138661c58ed667767383c49b848247cf (patch)
treed6c01e7b9faf57b69953dd6922f0884dd41daccb /gcc/gimplify.c
parent2a26eef835096987aa2fcf6fdb0c187f01075c04 (diff)
downloadgcc-ecd0e562138661c58ed667767383c49b848247cf.zip
gcc-ecd0e562138661c58ed667767383c49b848247cf.tar.gz
gcc-ecd0e562138661c58ed667767383c49b848247cf.tar.bz2
Remove ifn_va_arg ap fixup
2015-04-28 Tom de Vries <tom@codesourcery.com> PR tree-optimization/65887 * gimplify.c (gimplify_modify_expr): Remove ifn_va_arg ap fixup. * c-common.c (build_va_arg): Mark va_arg ap argument as addressable. From-SVN: r222546
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index c68bd47..1d5341e 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -4569,7 +4569,6 @@ gimplify_modify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
gimple assign;
location_t loc = EXPR_LOCATION (*expr_p);
gimple_stmt_iterator gsi;
- tree ap = NULL_TREE, ap_copy = NULL_TREE;
gcc_assert (TREE_CODE (*expr_p) == MODIFY_EXPR
|| TREE_CODE (*expr_p) == INIT_EXPR);
@@ -4730,16 +4729,12 @@ gimplify_modify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
enum internal_fn ifn = CALL_EXPR_IFN (*from_p);
auto_vec<tree> vargs (nargs);
- if (ifn == IFN_VA_ARG)
- ap = unshare_expr (CALL_EXPR_ARG (*from_p, 0));
for (i = 0; i < nargs; i++)
{
gimplify_arg (&CALL_EXPR_ARG (*from_p, i), pre_p,
EXPR_LOCATION (*from_p));
vargs.quick_push (CALL_EXPR_ARG (*from_p, i));
}
- if (ifn == IFN_VA_ARG)
- ap_copy = CALL_EXPR_ARG (*from_p, 0);
call_stmt = gimple_build_call_internal_vec (ifn, vargs);
gimple_set_location (call_stmt, EXPR_LOCATION (*expr_p));
}
@@ -4784,17 +4779,6 @@ gimplify_modify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
gsi = gsi_last (*pre_p);
maybe_fold_stmt (&gsi);
- /* When gimplifying the &ap argument of va_arg, we might end up with
- ap.1 = ap
- va_arg (&ap.1, 0B)
- We need to assign ap.1 back to ap, otherwise va_arg has no effect on
- ap. */
- if (ap != NULL_TREE
- && TREE_CODE (ap) == ADDR_EXPR
- && TREE_CODE (ap_copy) == ADDR_EXPR
- && !operand_equal_p (TREE_OPERAND (ap, 0), TREE_OPERAND (ap_copy, 0), 0))
- gimplify_assign (TREE_OPERAND (ap, 0), TREE_OPERAND (ap_copy, 0), pre_p);
-
if (want_value)
{
*expr_p = TREE_THIS_VOLATILE (*to_p) ? *from_p : unshare_expr (*to_p);