]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR rtl-optimization/8275 (ICE in simplify_subreg, at simplify-rtx.c:2452)
authorEric Botcazou <ebotcazou@libertysurf.fr>
Sun, 24 Nov 2002 22:14:19 +0000 (22:14 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Sun, 24 Nov 2002 22:14:19 +0000 (22:14 +0000)
PR optimization/8275

Merge from mainline:
2002-09-19 �Dale Johannesen <dalej@apple.com>

* combine.c (make_extraction): Don't create
invalid subreg.

From-SVN: r59440

gcc/ChangeLog
gcc/combine.c

index 0389723068bd220e46ae02e7e08ef5a8da017480..c32a397933d8d9e017b96088e52339440845a70f 100644 (file)
@@ -1,3 +1,13 @@
+2002-11-24  Eric Botcazou  <ebotcazou@libertysurf.fr>
+
+       PR optimization/8275
+
+       Merge from mainline:
+       2002-09-19  Dale Johannesen <dalej@apple.com>
+
+       * combine.c (make_extraction): Don't create
+       invalid subreg.
+
 2002-11-23  Marek Michalkiewicz  <marekm@amelek.gda.pl>
 
        2002-09-26  Theodore A. Roth  <troth@verinet.com>
index acaf3b15869af64b8e640106dbc803c7cd653c7c..65564d98310df8e30fab2e7839220a8be76d93ca 100644 (file)
@@ -6016,6 +6016,11 @@ make_extraction (mode, inner, pos, pos_rtx, len,
                final_word += (GET_MODE_SIZE (inner_mode)
                               - GET_MODE_SIZE (tmode)) % UNITS_PER_WORD;
 
+             /* Avoid creating invalid subregs, for example when
+                simplifying (x>>32)&255. */
+             if (final_word >= GET_MODE_SIZE (inner_mode))
+               return NULL_RTX;
+
              new = gen_rtx_SUBREG (tmode, inner, final_word);
            }
          else