expr.c (expand_expr, [...]): Do not try to optimize a aggregate address which has...
authorJeffrey A Law <law@cygnus.com>
Fri, 9 Apr 1999 01:35:36 +0000 (01:35 +0000)
committerJeff Law <law@gcc.gnu.org>
Fri, 9 Apr 1999 01:35:36 +0000 (19:35 -0600)
        * expr.c (expand_expr, case ARRAY_REF, COMPONENT_REF, BIT_FIELD_REF):
        Do not try to optimize a aggregate address which has VOIDmode.
        Mirrors March 23 change to expand_assignment.

From-SVN: r26307

gcc/ChangeLog
gcc/expr.c

index d06c3a4e5d9fee229646234a96c5bd241c6e9289..3d71a4fddbfd929fc7f1a69ddbe572cf0e44c8d8 100644 (file)
@@ -1,5 +1,9 @@
 Thu Apr  8 19:20:18 1999  Jeffrey A Law  (law@cygnus.com)
 
+       * expr.c (expand_expr, case ARRAY_REF, COMPONENT_REF, BIT_FIELD_REF):
+       Do not try to optimize a aggregate address which has VOIDmode.
+       Mirrors March 23 change to expand_assignment.
+
        * flow.c (delete_unreachable_blocks): Do not require an edge to
        be marked with EDGE_FALLTHRU when tidying an edge which connects
        consecutive basic blocks.
index d7f87c5743f52adbfde1210b41a071cc4541b30c..8d5a540218463b262ce96ad24a453aa6f8e9d202 100644 (file)
@@ -6417,8 +6417,11 @@ expand_expr (exp, target, tmode, modifier)
 #endif
              }
 
+           /* A constant address in TO_RTX can have VOIDmode, we must not try
+              to call force_reg for that case.  Avoid that case.  */
            if (GET_CODE (op0) == MEM
                && GET_MODE (op0) == BLKmode
+               && GET_MODE (XEXP (op0, 0)) != VOIDmode
                && bitsize
                && (bitpos % bitsize) == 0 
                && (bitsize % GET_MODE_ALIGNMENT (mode1)) == 0