------- Comment #3 from ubizjak at gmail dot com 2009-04-16 12:26 -------
This testcase fails for all optimization levels:
--cut here--
/* { dg-do compile } */
/* { dg-options "-w" } */
int test (char v1)
{
v1 >>= 0xdebecced;
return v1;
}
--cut here--
Follwing patch fixes the failure, but introduces several testsuite failures:
--cut here--
Index: optabs.c
===================================================================
--- optabs.c (revision 146146)
+++ optabs.c (working copy)
@@ -1478,18 +1478,10 @@ expand_binop_directly (enum machine_mode
for their mode. */
if (GET_MODE (xop0) != mode0 && mode0 != VOIDmode)
- xop0 = convert_modes (mode0,
- GET_MODE (xop0) != VOIDmode
- ? GET_MODE (xop0)
- : mode,
- xop0, unsignedp);
+ xop0 = convert_modes (mode0, GET_MODE (xop0), xop0, unsignedp);
if (GET_MODE (xop1) != mode1 && mode1 != VOIDmode)
- xop1 = convert_modes (mode1,
- GET_MODE (xop1) != VOIDmode
- ? GET_MODE (xop1)
- : mode,
- xop1, unsignedp);
+ xop1 = convert_modes (mode1, GET_MODE (xop1), xop1, unsignedp);
/* If operation is commutative,
try to make the first operand a register.
--cut here--
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39779