aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorGeorg-Johann Lay <avr@gjlay.de>2014-03-14 09:27:19 +0000
committerGeorg-Johann Lay <gjl@gcc.gnu.org>2014-03-14 09:27:19 +0000
commit2832dc2203a311e070b3fa962d8536e5031a53b4 (patch)
treedf1b0bdbecb20a0cc2559e4582f1d6b37d6f5888 /gcc/config
parent6cdea8070cea38af6571dc932dbc03075fe290fb (diff)
downloadgcc-2832dc2203a311e070b3fa962d8536e5031a53b4.zip
gcc-2832dc2203a311e070b3fa962d8536e5031a53b4.tar.gz
gcc-2832dc2203a311e070b3fa962d8536e5031a53b4.tar.bz2
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
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/avr/avr.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c
index e16f3bf..8ca7de0 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. */