diff options
author | Hiroaki Etoh <etoh@cvs.openbsd.org> | 2002-12-25 14:24:12 +0000 |
---|---|---|
committer | Hiroaki Etoh <etoh@cvs.openbsd.org> | 2002-12-25 14:24:12 +0000 |
commit | 1d31ed6eeb307d8afe953248f636416369adfae4 (patch) | |
tree | 0e2c9977a30ab5ce7bc9b8aae4dc647c618a20a8 | |
parent | e8f9143be6dff7c255d14418dd432db9a835c0f3 (diff) |
assign_stack_temp_for_type: fix to find an already-allocated temporal string for local variables of an inline function
-rw-r--r-- | gnu/egcs/gcc/function.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gnu/egcs/gcc/function.c b/gnu/egcs/gcc/function.c index 88523dfcc79..cb48ebf4ec0 100644 --- a/gnu/egcs/gcc/function.c +++ b/gnu/egcs/gcc/function.c @@ -825,6 +825,10 @@ assign_stack_local (mode, size, align) addr = plus_constant (virtual_stack_vars_rtx, frame_offset + bigend_correction); + if (flag_propolice_protection + && addr == virtual_stack_vars_rtx && mode == BLKmode && size > 0) + addr = gen_rtx_PLUS (GET_MODE (addr), addr, GEN_INT (0)); + #ifndef FRAME_GROWS_DOWNWARD frame_offset += size; #endif @@ -939,10 +943,7 @@ assign_stack_temp_for_type (mode, size, keep, type) int align; int alias_set; struct temp_slot *p, *best_p = 0; - int char_array = type && (TREE_TYPE (type)==char_type_node - || (TREE_TYPE (type) - && TREE_CODE (TREE_TYPE (type)) == INTEGER_TYPE - && TYPE_PRECISION (TREE_TYPE (type)) == 8)); + int char_array = (keep == 1 && search_string_def (type)); /* If SIZE is -1 it means that somebody tried to allocate a temporary of a variable size. */ |