From: Georg-Johann Lay Date: Fri, 14 Mar 2014 09:27:19 +0000 (+0000) Subject: re PR target/59396 ([avr] Wrong warning with ISR() and -flto) X-Git-Tag: releases/gcc-4.9.0~457 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2832dc2203a311e070b3fa962d8536e5031a53b4;p=thirdparty%2Fgcc.git re PR target/59396 ([avr] Wrong warning with ISR() and -flto) 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. From-SVN: r208562 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8f92d2db8098..f20c9de4bf18 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 e16f3bf058ad..8ca7de0b36dd 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. */