diff options
author | Richard Biener <rguenther@suse.de> | 2016-10-28 13:07:59 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2016-10-28 13:07:59 +0000 |
commit | 2a762fe1652ff05808a82c5169e44412516de7da (patch) | |
tree | dbe13b60680342e6522fcbf51a26c21bd61c9d28 /gcc/fold-const.c | |
parent | 539405d5541e31914995e5efbd4660ddf382f834 (diff) | |
download | gcc-2a762fe1652ff05808a82c5169e44412516de7da.zip gcc-2a762fe1652ff05808a82c5169e44412516de7da.tar.gz gcc-2a762fe1652ff05808a82c5169e44412516de7da.tar.bz2 |
re PR middle-end/78128 (fortran/resolve.c:resolve_operator miscompiled at -O2)
2016-10-28 Richard Biener <rguenther@suse.de>
PR middle-end/78128
PR middle-end/71002
* fold-const.c (make_bit_field_ref): Only adjust alias set
when the original alias set was zero.
From-SVN: r241645
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 89ed89d..eaa7c07 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -3809,11 +3809,11 @@ make_bit_field_ref (location_t loc, tree inner, tree orig_inner, tree type, { tree result, bftype; - if (get_alias_set (inner) != get_alias_set (orig_inner)) + alias_set_type iset = get_alias_set (orig_inner); + if (iset == 0 && get_alias_set (inner) != iset) inner = fold_build2 (MEM_REF, TREE_TYPE (inner), build_fold_addr_expr (inner), - build_int_cst - (reference_alias_ptr_type (orig_inner), 0)); + build_int_cst (ptr_type_node, 0)); if (bitpos == 0 && !reversep) { |