diff options
author | Steven Bosscher <stevenb@suse.de> | 2004-01-13 01:58:45 +0000 |
---|---|---|
committer | Steven Bosscher <steven@gcc.gnu.org> | 2004-01-13 01:58:45 +0000 |
commit | faed5cc356c09c41cdbc7de97ef2520c7f5a805d (patch) | |
tree | 620724275961c3e490611bea34f8d2c8cba0a9dd /gcc/config/c4x | |
parent | e4a32afbe15212baa1f5eab9d0315077ca005a9d (diff) | |
download | gcc-faed5cc356c09c41cdbc7de97ef2520c7f5a805d.zip gcc-faed5cc356c09c41cdbc7de97ef2520c7f5a805d.tar.gz gcc-faed5cc356c09c41cdbc7de97ef2520c7f5a805d.tar.bz2 |
re PR c++/13376 (Incorrect dumps of RTL for passes that use current_function_name)
PR c++/13376
* function.h (struct function): Kill `name' field.
(current_function_name): Make it an extern function.
* function.c (current_function_name): New function.
* graph.c: Update all uses of current_function_name.
* gcse.c: Likewise.
* config/alpha/alpha.c, config/avr/avr.c, config/c4x/c4x.c,
config/mips/mips.c, config/pdp11/pdp11.c: Likewise.
* config/ip2k/ip2k.c (function_prologue): Use MAIN_NAME_P
instead of a strcmp with "main".
From-SVN: r75784
Diffstat (limited to 'gcc/config/c4x')
-rw-r--r-- | gcc/config/c4x/c4x.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/gcc/config/c4x/c4x.c b/gcc/config/c4x/c4x.c index 9eaa8719..28e1335 100644 --- a/gcc/config/c4x/c4x.c +++ b/gcc/config/c4x/c4x.c @@ -791,18 +791,20 @@ c4x_naked_function_p (void) int c4x_interrupt_function_p (void) { + const char *cfun_name; if (lookup_attribute ("interrupt", TYPE_ATTRIBUTES (TREE_TYPE (current_function_decl)))) return 1; /* Look for TI style c_intnn. */ - return current_function_name[0] == 'c' - && current_function_name[1] == '_' - && current_function_name[2] == 'i' - && current_function_name[3] == 'n' - && current_function_name[4] == 't' - && ISDIGIT (current_function_name[5]) - && ISDIGIT (current_function_name[6]); + cfun_name = current_function_name (); + return cfun_name[0] == 'c' + && cfun_name[1] == '_' + && cfun_name[2] == 'i' + && cfun_name[3] == 'n' + && cfun_name[4] == 't' + && ISDIGIT (cfun_name[5]) + && ISDIGIT (cfun_name[6]); } void @@ -846,7 +848,7 @@ c4x_expand_prologue (void) storage! */ if (size > 32767) error ("ISR %s requires %d words of local vars, max is 32767", - current_function_name, size); + current_function_name (), size); insn = emit_insn (gen_addqi3 (gen_rtx_REG (QImode, SP_REGNO), gen_rtx_REG (QImode, SP_REGNO), |