From f69c9a90213da0b7b03bf44dcb40031c1b69a22d Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 21 Jul 2011 11:39:16 +0200 Subject: [PATCH] re PR middle-end/48973 (Inliner bug with one-bit (1-bit) bitfield) PR middle-end/48973 * expr.c (expand_expr_real_1) : If the comparison has a single bit signed type, use constm1_rtx instead of const1_rtx for true value. From-SVN: r176555 --- gcc/ChangeLog | 7 +++++++ gcc/expr.c | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6daa84686535..b4feffa5a6c8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2011-07-21 Jakub Jelinek + + PR middle-end/48973 + * expr.c (expand_expr_real_1) : If + the comparison has a single bit signed type, use + constm1_rtx instead of const1_rtx for true value. + 2011-07-19 Jakub Jelinek Backport from mainline diff --git a/gcc/expr.c b/gcc/expr.c index 0d96eb334417..8cc28fb88703 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -9166,7 +9166,9 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, jumpifnot (exp, op1, -1); if (target) - emit_move_insn (target, const1_rtx); + emit_move_insn (target, + TYPE_PRECISION (type) == 1 && !TYPE_UNSIGNED (type) + ? constm1_rtx : const1_rtx); emit_label (op1); return ignore ? const0_rtx : target; -- 2.47.2