diff options
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r-- | gcc/gimplify.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 0c2e5e2..47a2fe7 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -5890,8 +5890,14 @@ gimplify_expr (tree *expr_p, tree *pre_p, tree *post_p, break; case TRUTH_NOT_EXPR: - TREE_OPERAND (*expr_p, 0) - = gimple_boolify (TREE_OPERAND (*expr_p, 0)); + if (TREE_CODE (TREE_TYPE (*expr_p)) != BOOLEAN_TYPE) + { + tree type = TREE_TYPE (*expr_p); + *expr_p = fold_convert (type, gimple_boolify (*expr_p)); + ret = GS_OK; + break; + } + ret = gimplify_expr (&TREE_OPERAND (*expr_p, 0), pre_p, post_p, is_gimple_val, fb_rvalue); recalculate_side_effects (*expr_p); |