aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfgexpand.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r--gcc/cfgexpand.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index e60df87..7b8df04 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -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);