]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c/8439 (empty struct causes crash)
authorEric Botcazou <ebotcazou@libertysurf.fr>
Sat, 23 Nov 2002 08:01:21 +0000 (09:01 +0100)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Sat, 23 Nov 2002 08:01:21 +0000 (08:01 +0000)
PR c/8439
* recog.c (validate_replace_rtx_1) [PLUS]: Simplify only
if there is something new to be simplified.

From-SVN: r59398

gcc/ChangeLog
gcc/recog.c

index 9de3fc6077de6681afb85fbaf87236d94704729b..f4ed0001f01dc0eb687255876c90713ed58ef5e4 100644 (file)
@@ -1,3 +1,9 @@
+2002-11-22  Eric Botcazou  <ebotcazou@libertysurf.fr>
+
+       PR c/8439
+       * recog.c (validate_replace_rtx_1) [PLUS]: Simplify only
+       if there is something new to be simplified.
+
 2002-11-22  Toon Moene  <toon@moene.indiv.nluug.nl>
 
        * c-decl.c (c_init_decl_processing): Move generation of
index d9848ddf70d210b37e655f075e10aeb842204914..41193dba38800158abba651c8857235922560628 100644 (file)
@@ -507,10 +507,10 @@ validate_replace_rtx_1 (loc, from, to, object)
     {
     case PLUS:
       /* If we have a PLUS whose second operand is now a CONST_INT, use
-         plus_constant to try to simplify it.
+         simplify_gen_binary to try to simplify it.
          ??? We may want later to remove this, once simplification is
          separated from this function.  */
-      if (GET_CODE (XEXP (x, 1)) == CONST_INT)
+      if (GET_CODE (XEXP (x, 1)) == CONST_INT && XEXP (x, 1) == to)
        validate_change (object, loc,
                         simplify_gen_binary
                         (PLUS, GET_MODE (x), XEXP (x, 0), XEXP (x, 1)), 1);