diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-05-21 23:27:50 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-05-21 23:27:50 +0000 |
commit | 95873270e49f9efa56604ccdc8de424d6fcfa7ab (patch) | |
tree | 00dff20d1a02c10136c2bb463d14aef3ad2b267b /gcc/cp/init.c | |
parent | 5394ce39374fab466d7e8e35b6cbe5ea757a0648 (diff) | |
download | gcc-95873270e49f9efa56604ccdc8de424d6fcfa7ab.tar.gz |
* init.c (build_vec_delete): Copy the address into a temporary
variable before calling build_vec_delete_1.
* decl2.c (delete_sanity): Don't call stabilize_reference.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67072 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/init.c')
-rw-r--r-- | gcc/cp/init.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/gcc/cp/init.c b/gcc/cp/init.c index 4b6fdc81c86..1b6ba8f40c0 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -3359,21 +3359,24 @@ build_vec_delete (base, maxindex, auto_delete_vec, use_global_delete) int use_global_delete; { tree type; + tree rval; + tree base_init = NULL_TREE; if (TREE_CODE (base) == OFFSET_REF) base = resolve_offset_ref (base); type = TREE_TYPE (base); - base = stabilize_reference (base); - if (TREE_CODE (type) == POINTER_TYPE) { /* Step back one from start of vector, and read dimension. */ tree cookie_addr; if (TREE_SIDE_EFFECTS (base)) - base = save_expr (base); + { + base_init = get_target_expr (base); + base = TARGET_EXPR_SLOT (base_init); + } type = strip_array_types (TREE_TYPE (type)); cookie_addr = build (MINUS_EXPR, build_pointer_type (sizetype), @@ -3388,7 +3391,10 @@ build_vec_delete (base, maxindex, auto_delete_vec, use_global_delete) type = strip_array_types (type); base = build_unary_op (ADDR_EXPR, base, 1); if (TREE_SIDE_EFFECTS (base)) - base = save_expr (base); + { + base_init = get_target_expr (base); + base = TARGET_EXPR_SLOT (base_init); + } } else { @@ -3397,6 +3403,10 @@ build_vec_delete (base, maxindex, auto_delete_vec, use_global_delete) return error_mark_node; } - return build_vec_delete_1 (base, maxindex, type, auto_delete_vec, + rval = build_vec_delete_1 (base, maxindex, type, auto_delete_vec, use_global_delete); + if (base_init) + rval = build (COMPOUND_EXPR, TREE_TYPE (rval), base_init, rval); + + return rval; } |