re PR middle-end/52209 (wrong code at -O0)
PR middle-end/52209 * expr.c (expand_expr_real_2) <case BIT_NOT_EXPR>: Only expand using XOR for reduce_bit_field if type is unsigned. * gcc.c-torture/execute/pr52209.c: New test. From-SVN: r184151
This commit is contained in:
parent
5ac5049603
commit
205ec405fc
|
@ -1,3 +1,9 @@
|
||||||
|
2012-02-13 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
PR middle-end/52209
|
||||||
|
* expr.c (expand_expr_real_2) <case BIT_NOT_EXPR>: Only expand using
|
||||||
|
XOR for reduce_bit_field if type is unsigned.
|
||||||
|
|
||||||
2012-02-12 Eric Botcazou <ebotcazou@adacore.com>
|
2012-02-12 Eric Botcazou <ebotcazou@adacore.com>
|
||||||
|
|
||||||
* config/sparc/sparc.h (CANNOT_CHANGE_MODE_CLASS): In 64-bit mode,
|
* config/sparc/sparc.h (CANNOT_CHANGE_MODE_CLASS): In 64-bit mode,
|
||||||
|
|
|
@ -8600,8 +8600,9 @@ expand_expr_real_2 (sepops ops, rtx target, enum machine_mode tmode,
|
||||||
if (modifier == EXPAND_STACK_PARM)
|
if (modifier == EXPAND_STACK_PARM)
|
||||||
target = 0;
|
target = 0;
|
||||||
/* In case we have to reduce the result to bitfield precision
|
/* In case we have to reduce the result to bitfield precision
|
||||||
expand this as XOR with a proper constant instead. */
|
for unsigned bitfield expand this as XOR with a proper constant
|
||||||
if (reduce_bit_field)
|
instead. */
|
||||||
|
if (reduce_bit_field && TYPE_UNSIGNED (type))
|
||||||
temp = expand_binop (mode, xor_optab, op0,
|
temp = expand_binop (mode, xor_optab, op0,
|
||||||
immed_double_int_const
|
immed_double_int_const
|
||||||
(double_int_mask (TYPE_PRECISION (type)), mode),
|
(double_int_mask (TYPE_PRECISION (type)), mode),
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2012-02-13 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
PR middle-end/52209
|
||||||
|
* gcc.c-torture/execute/pr52209.c: New test.
|
||||||
|
|
||||||
2012-02-12 Mikael Morin <mikael@gcc.gnu.org>
|
2012-02-12 Mikael Morin <mikael@gcc.gnu.org>
|
||||||
|
|
||||||
PR fortran/50981
|
PR fortran/50981
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
/* PR middle-end/52209 */
|
||||||
|
|
||||||
|
extern void abort (void);
|
||||||
|
struct S0 { int f2 : 1; } c;
|
||||||
|
int b;
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
b = -1 ^ c.f2;
|
||||||
|
if (b != -1)
|
||||||
|
abort ();
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Reference in New Issue