]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c/7411 (cistore.c:392: Internal compiler error in instantiate_virtual_regs_1...
authorEric Botcazou <ebotcazou@libertysurf.fr>
Mon, 7 Oct 2002 07:39:20 +0000 (09:39 +0200)
committerRichard Henderson <rth@gcc.gnu.org>
Mon, 7 Oct 2002 07:39:20 +0000 (00:39 -0700)
 PR c/7411
 * expr.c (expand_expr) [PLUS]: Simplify after the operands
 have been expanded in EXPAND_NORMAL mode.

Co-Authored-By: Volker Reichelt <reichelt@igpm.rwth-aachen.de>
From-SVN: r57884

gcc/ChangeLog
gcc/expr.c

index 8edbd8f218073c9b49b287d372f8e80043061be9..315e80094387b0e183c534919e46b9b6e155f186 100644 (file)
@@ -1,3 +1,10 @@
+2002-09-25  Eric Botcazou  <ebotcazou@libertysurf.fr>
+            Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+       PR c/7411
+       * expr.c (expand_expr) [PLUS]: Simplify after the operands
+       have been expanded in EXPAND_NORMAL mode.
+
 2002-10-06  Richard Henderson  <rth@redhat.com>
 
        * config/rs6000/rs6000.md (load_toc_v4_PIC_2): Fix base constraint.
index a7d78a121a6ec8d5e367ac45999440bc6132fb7d..99f7fcf84b0c0e5db77122b17c05f922218eb4cc 100644 (file)
@@ -7588,16 +7588,23 @@ expand_expr (exp, target, tmode, modifier)
            }
        }
 
+      if (! safe_from_p (subtarget, TREE_OPERAND (exp, 1), 1))
+       subtarget = 0;
+
       /* No sense saving up arithmetic to be done
         if it's all in the wrong mode to form part of an address.
         And force_operand won't know whether to sign-extend or
         zero-extend.  */
       if ((modifier != EXPAND_SUM && modifier != EXPAND_INITIALIZER)
          || mode != ptr_mode)
-       goto binop;
-
-      if (! safe_from_p (subtarget, TREE_OPERAND (exp, 1), 1))
-       subtarget = 0;
+       {
+         op0 = expand_expr (TREE_OPERAND (exp, 0), subtarget, VOIDmode, 0);
+         op1 = expand_expr (TREE_OPERAND (exp, 1), NULL_RTX, VOIDmode, 0);
+         temp = simplify_binary_operation (PLUS, mode, op0, op1);
+         if (temp)
+           return temp;
+         goto binop2;
+       }
 
       op0 = expand_expr (TREE_OPERAND (exp, 0), subtarget, VOIDmode, modifier);
       op1 = expand_expr (TREE_OPERAND (exp, 1), NULL_RTX, VOIDmode, modifier);