From 5cf3629251b7551a6082c1dca59675f042f986f4 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Wed, 22 Apr 2015 09:03:01 +0000 Subject: [PATCH] Fix va_arg ap_copy nop detection 2015-04-22 Tom de Vries PR tree-optimization/65823 * gimplify.c (gimplify_modify_expr): Use operand_equal_p to test for equality between ap_copy and ap. From-SVN: r222318 --- gcc/ChangeLog | 6 ++++++ gcc/gimplify.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2e70a87153f..59eb8f8c1ec 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-04-22 Tom de Vries + + PR tree-optimization/65823 + * gimplify.c (gimplify_modify_expr): Use operand_equal_p to test for + equality between ap_copy and ap. + 2015-04-22 Bernhard Reutner-Fischer PR target/47098 diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 0a8ef84169f..c68bd474756 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -4792,7 +4792,7 @@ gimplify_modify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p, if (ap != NULL_TREE && TREE_CODE (ap) == ADDR_EXPR && TREE_CODE (ap_copy) == ADDR_EXPR - && TREE_OPERAND (ap, 0) != TREE_OPERAND (ap_copy, 0)) + && !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) -- 2.30.2