diff options
author | Richard Biener <rguenther@suse.de> | 2020-03-19 10:15:52 +0100 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2020-03-19 10:18:01 +0100 |
commit | 73bc09fa8c6b973a928a599498caa66a25c8bc8d (patch) | |
tree | b05b87310a0bca42f13f0e8d6949193424a819d5 /gcc/fold-const.c | |
parent | b5562f1187d47b0e8a20687a8d31d00c187aada9 (diff) | |
download | gcc-73bc09fa8c6b973a928a599498caa66a25c8bc8d.zip gcc-73bc09fa8c6b973a928a599498caa66a25c8bc8d.tar.gz gcc-73bc09fa8c6b973a928a599498caa66a25c8bc8d.tar.bz2 |
middle-end/94216 fix another build_fold_addr_expr use
2020-03-19 Richard Biener <rguenther@suse.de>
PR middle-end/94216
* fold-const.c (fold_binary_loc): Avoid using
build_fold_addr_expr when we really want an ADDR_EXPR.
* g++.dg/torture/pr94216.C: New testcase.
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 3ab1a9a..9267914 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -10284,7 +10284,7 @@ fold_binary_loc (location_t loc, enum tree_code code, tree type, if (!base) return NULL_TREE; return fold_build2 (MEM_REF, type, - build_fold_addr_expr (base), + build1 (ADDR_EXPR, TREE_TYPE (arg0), base), int_const_binop (PLUS_EXPR, arg1, size_int (coffset))); } |