+2010-11-16 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR rtl-optimization/46490
+ * combine.c (expand_compound_operation): Fix thinko.
+
2010-11-16 Richard Henderson <rth@redhat.com>
PR target/46470
count. This can happen in a case like (x >> 31) & 255 on machines
that can't shift by a constant. On those machines, we would first
combine the shift with the AND to produce a variable-position
- extraction. Then the constant of 31 would be substituted in to produce
- a such a position. */
+ extraction. Then the constant of 31 would be substituted in
+ to produce such a position. */
modewidth = GET_MODE_BITSIZE (GET_MODE (x));
- if (modewidth + len >= pos)
+ if (modewidth >= pos + len)
{
enum machine_mode mode = GET_MODE (x);
tem = gen_lowpart (mode, XEXP (x, 0));
2010-11-16 Eric Botcazou <ebotcazou@adacore.com>
+ * gnat.dg/opt12.adb: New test.
+ * gnat.dg/opt12_pkg.ad[sb]: New helper.
+
+2010-11-16 Eric Botcazou <ebotcazou@adacore.com>
+
* gcc.target/rx/pack.c: New test.
2010-11-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
--- /dev/null
+-- { dg-do run }
+-- { dg-options "-O2" }
+
+with Opt12_Pkg; use Opt12_Pkg;
+
+procedure Opt12 is
+
+ Static_Target : Static_Integer_Subtype;
+
+begin
+
+ Static_Target := Static_Integer_Subtype(Fix_Half);
+
+ if not Equal(Static_Target, 1) then
+ raise Program_Error;
+ end if;
+
+end Opt12;
--- /dev/null
+package body Opt12_Pkg is
+
+ function Equal (L, R: Static_Integer_Subtype) return Boolean is
+ begin
+ return (L = R);
+ end;
+
+end Opt12_Pkg;
--- /dev/null
+package Opt12_Pkg is
+
+ type Static_Integer_Subtype is range -32_000 .. 32_000;
+
+ function Equal (L, R: Static_Integer_Subtype) return Boolean;
+
+ type My_Fixed is delta 0.1 range -5.0 .. 5.0;
+
+ Fix_Half : My_Fixed := 0.5;
+
+end Opt12_Pkg;