diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8f92d2db809..f20c9de4bf1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2014-03-14 Georg-Johann Lay + + PR target/59396 + * config/avr/avr.c (avr_set_current_function): Pass function name + through default_strip_name_encoding before sanity checking instead + of skipping the first char of the assembler name. + 2014-03-13 Richard Henderson PR debug/60438 diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index e16f3bf058a..8ca7de0b36d 100644 --- a/gcc/config/avr/avr.c +++ b/gcc/config/avr/avr.c @@ -600,10 +600,14 @@ avr_set_current_function (tree decl) const char *name; name = DECL_ASSEMBLER_NAME_SET_P (decl) - /* Remove the leading '*' added in set_user_assembler_name. */ - ? 1 + IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)) + ? IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)) : IDENTIFIER_POINTER (DECL_NAME (decl)); + /* Skip a leading '*' that might still prefix the assembler name, + e.g. in non-LTO runs. */ + + name = default_strip_name_encoding (name); + /* Silently ignore 'signal' if 'interrupt' is present. AVR-LibC startet using this when it switched from SIGNAL and INTERRUPT to ISR. */