re PR middle-end/26622 (ICE in extract_insn, at recog.c:2084)
gcc/ PR tree-optimization/26622. * fold-const.c (fold_ternary) <COND_EXPR>: Call fold_convert on arg1. gcc/testsuite/ PR tree-optimization/26622. * gcc.c-torture/compile/pr26622.c: New. From-SVN: r113956
This commit is contained in:
parent
4d49d44d66
commit
5104d6484a
@ -5,6 +5,10 @@
|
||||
simplifications of (eq/ne (xor x y) y) and
|
||||
(eq/ne (xor x y) x).
|
||||
|
||||
PR tree-optimization/26622.
|
||||
* fold-const.c (fold_ternary) <COND_EXPR>: Call fold_convert
|
||||
on arg1.
|
||||
|
||||
2006-05-21 Bernhard Fischer <aldot@gcc.gnu.org>
|
||||
|
||||
* tree-cfg.c: Prune whitespace.
|
||||
|
@ -11072,8 +11072,10 @@ fold_ternary (enum tree_code code, tree type, tree op0, tree op1, tree op2)
|
||||
&& integer_zerop (TREE_OPERAND (arg0, 1))
|
||||
&& integer_zerop (op2)
|
||||
&& (tem = sign_bit_p (TREE_OPERAND (arg0, 0), arg1)))
|
||||
return fold_convert (type, fold_build2 (BIT_AND_EXPR,
|
||||
TREE_TYPE (tem), tem, arg1));
|
||||
return fold_convert (type,
|
||||
fold_build2 (BIT_AND_EXPR,
|
||||
TREE_TYPE (tem), tem,
|
||||
fold_convert (TREE_TYPE (tem), arg1)));
|
||||
|
||||
/* (A >> N) & 1 ? (1 << N) : 0 is simply A & (1 << N). A & 1 was
|
||||
already handled above. */
|
||||
|
@ -4,6 +4,9 @@
|
||||
* gcc.c-torture/execute/pr27671-1.c: New.
|
||||
* gcc.dg/pr27671-2.c: Likewise.
|
||||
|
||||
PR tree-optimization/26622.
|
||||
* gcc.c-torture/compile/pr26622.c: New.
|
||||
|
||||
2006-05-21 Paul Thomas <pault@gcc.gnu.org>
|
||||
|
||||
PR fortran/27613
|
||||
|
11
gcc/testsuite/gcc.c-torture/compile/pr26622.c
Normal file
11
gcc/testsuite/gcc.c-torture/compile/pr26622.c
Normal file
@ -0,0 +1,11 @@
|
||||
/* PR middle-end/26622
|
||||
fold_ternary used to create a tree with mismatching types, causing
|
||||
(const_int 128) to appear in QImode rtx. */
|
||||
|
||||
unsigned char g;
|
||||
|
||||
unsigned long long
|
||||
foo (void)
|
||||
{
|
||||
return ((long long) ((g & 0x80) != 0)) << 7;
|
||||
}
|
Loading…
Reference in New Issue
Block a user