diff options
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 6db16b5..fb54ffa 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -14006,7 +14006,8 @@ fold_indirect_ref_1 (location_t loc, tree type, tree op0) STRIP_NOPS (sub); subtype = TREE_TYPE (sub); - if (!POINTER_TYPE_P (subtype)) + if (!POINTER_TYPE_P (subtype) + || TYPE_REF_CAN_ALIAS_ALL (TREE_TYPE (op0))) return NULL_TREE; if (TREE_CODE (sub) == ADDR_EXPR) |