diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-02 06:47:01 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-02 06:47:01 +0000 |
commit | 41dc12b443303c7422244ad83c673fc022a18aa9 (patch) | |
tree | 92274b998af0cc6f86fd45d1b53bb9d1eef8bed0 /gcc/fold-const.c | |
parent | 998d01227e4b1c1980db971f01db98195a7d4eaa (diff) | |
download | gcc-41dc12b443303c7422244ad83c673fc022a18aa9.tar.gz |
PR middle-end/17258
* calls.c (initialize_argument_information): Tighten pass-through
conditions for pass-by-reference. Remove dead TARGET_EXPR code.
Use build_fold_addr_expr.
(emit_library_call_value_1): Use build_fold_addr_expr. Remove code
that assumes ADDR_EXPR allocates stack space.
* fold-const.c (build_fold_addr_expr_with_type): Look through
WITH_SIZE_EXPR.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86957 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 1ccea7e69b3..d8c511a615e 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -10446,6 +10446,10 @@ fold_relational_const (enum tree_code code, tree type, tree op0, tree op1) tree build_fold_addr_expr_with_type (tree t, tree ptrtype) { + /* The size of the object is not relevant when talking about its address. */ + if (TREE_CODE (t) == WITH_SIZE_EXPR) + t = TREE_OPERAND (t, 0); + if (TREE_CODE (t) == INDIRECT_REF) { t = TREE_OPERAND (t, 0); |