diff options
author | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-06-13 14:59:40 +0000 |
---|---|---|
committer | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-06-13 14:59:40 +0000 |
commit | f2266358ce37f9849a34911fa6ea4b9e284d7a6c (patch) | |
tree | 36256906046023419e83d36a7705ff6156e2b065 /gcc/fold-const.c | |
parent | 8640ef1b00883b206d588d51624a1ac6bdfb7d4e (diff) | |
download | gcc-f2266358ce37f9849a34911fa6ea4b9e284d7a6c.tar.gz |
PR middle-end/21985
* fold-const.c (split_address_to_core_and_offset): Always return
the address of the base object.
* gcc.dg/tree-ssa/pr21985.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100877 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index af3f01c38df..2c1bd15b365 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -11801,9 +11801,7 @@ split_address_to_core_and_offset (tree exp, core = get_inner_reference (TREE_OPERAND (exp, 0), &bitsize, pbitpos, poffset, &mode, &unsignedp, &volatilep, false); - - if (TREE_CODE (core) == INDIRECT_REF) - core = TREE_OPERAND (core, 0); + core = build_fold_addr_expr (core); } else { |