diff options
author | dberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-15 01:26:35 +0000 |
---|---|---|
committer | dberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-15 01:26:35 +0000 |
commit | eb079594363d78340613e05cb14f918136239880 (patch) | |
tree | 5152c9ec2737c779726a8e050244706fcefdc704 /gcc/tree-tailcall.c | |
parent | bce471493dbd17218e3acbc35ee809986ba855c0 (diff) | |
download | gcc-eb079594363d78340613e05cb14f918136239880.tar.gz |
2005-03-14 Daniel Berlin <dberlin@dberlin.org>
Fix PR tree-optimization/20458
* tree-flow-inline.h (mark_call_clobbered): Don't fiddle
DECL_EXTERNAL on STRUCT_FIELD tags.
(clear_call_clobbered): Ditto.
* tree-ssa-operands.c (note_addressable): Make sure the original
variable doesn't slip into the addressable list if we have
subvars.
* tree-tailcall.c (suitable_for_tail_opt_p): Look at STRUCT_FIELD
tags too.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96462 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-tailcall.c')
-rw-r--r-- | gcc/tree-tailcall.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/tree-tailcall.c b/gcc/tree-tailcall.c index 8f4778da0b3..3c2036cdeac 100644 --- a/gcc/tree-tailcall.c +++ b/gcc/tree-tailcall.c @@ -137,14 +137,15 @@ suitable_for_tail_opt_p (void) if (current_function_stdarg) return false; - /* No local variable should be call-clobbered. We ignore any kind - of memory tag, as these are not real variables. */ + /* No local variable nor structure field should be call-clobbered. We + ignore any kind of memory tag, as these are not real variables. */ for (i = 0; i < (int) VARRAY_ACTIVE_SIZE (referenced_vars); i++) { tree var = VARRAY_TREE (referenced_vars, i); if (!(TREE_STATIC (var) || DECL_EXTERNAL (var)) - && var_ann (var)->mem_tag_kind == NOT_A_TAG + && (var_ann (var)->mem_tag_kind == NOT_A_TAG + || var_ann (var)->mem_tag_kind == STRUCT_FIELD) && is_call_clobbered (var)) return false; } |