aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index 38be0ce..2dc505a 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -1739,6 +1739,10 @@ gimplify_conversion (tree *expr_p)
*expr_p = fold_build1_loc (loc, VIEW_CONVERT_EXPR, TREE_TYPE (*expr_p),
TREE_OPERAND (*expr_p, 0));
+ /* Canonicalize CONVERT_EXPR to NOP_EXPR. */
+ if (TREE_CODE (*expr_p) == CONVERT_EXPR)
+ TREE_SET_CODE (*expr_p, NOP_EXPR);
+
return GS_OK;
}