]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Check for valid use of subreg.
authorFariborz Jahanian <fjahanian@apple.com>
Mon, 26 Sep 2005 17:42:16 +0000 (17:42 +0000)
committerFariborz Jahanian <fjahanian@gcc.gnu.org>
Mon, 26 Sep 2005 17:42:16 +0000 (17:42 +0000)
Oked by Richard Henderson.

From-SVN: r104649

gcc/ChangeLog
gcc/combine.c

index 8cdc5e3c6d2e47a76e7252fcca014c90ea2a8833..5654d3df2bff58e4386a2bf3344b35e94cf6bd60 100644 (file)
@@ -1,3 +1,7 @@
+2005-09-26    Fariborz Jahanian <fjahanian@apple.com>
+
+        * combine.c (make_extraction): Check for valid use of subreg.
+
 2005-09-26  Uros Bizjak  <uros@kss-loka.si>
 
        PR target/24055
index 57f490da76b94b68b031bd18c48a2304c99cb3ef..4ab0f18097e2ddc2ff05de1650381a0f9ba302c1 100644 (file)
@@ -6314,7 +6314,7 @@ make_extraction (enum machine_mode mode, rtx inner, HOST_WIDE_INT pos,
 
                  /* Avoid creating invalid subregs, for example when
                     simplifying (x>>32)&255.  */
-                 if (final_word >= GET_MODE_SIZE (inner_mode))
+                 if (!validate_subreg (tmode, inner_mode, inner, final_word))
                    return NULL_RTX;
 
                  new = gen_rtx_SUBREG (tmode, inner, final_word);