OSDN Git Service

Check for valid use of subreg.
authorfjahanian <fjahanian@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 26 Sep 2005 17:42:16 +0000 (17:42 +0000)
committerfjahanian <fjahanian@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 26 Sep 2005 17:42:16 +0000 (17:42 +0000)
Oked by Richard Henderson.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104649 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/combine.c

index 8cdc5e3..5654d3d 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 57f490d..4ab0f18 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);