aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2016-10-28 13:07:59 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2016-10-28 13:07:59 +0000
commit2a762fe1652ff05808a82c5169e44412516de7da (patch)
treedbe13b60680342e6522fcbf51a26c21bd61c9d28 /gcc/fold-const.c
parent539405d5541e31914995e5efbd4660ddf382f834 (diff)
downloadgcc-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.c6
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)
{