OSDN Git Service

PR debug/43166
[pf3gnuchains/gcc-fork.git] / gcc / cfgexpand.c
index e60df87..7b8df04 100644 (file)
@@ -2316,7 +2316,11 @@ expand_debug_expr (tree exp)
       else
        op0 = copy_rtx (op0);
 
-      if (GET_MODE (op0) == BLKmode)
+      if (GET_MODE (op0) == BLKmode
+         /* If op0 is not BLKmode, but BLKmode is, adjust_mode
+            below would ICE.  While it is likely a FE bug,
+            try to be robust here.  See PR43166.  */
+         || mode == BLKmode)
        {
          gcc_assert (MEM_P (op0));
          op0 = adjust_address_nv (op0, mode, 0);