From: Georg-Johann Lay Date: Fri, 14 Mar 2014 09:52:07 +0000 (+0000) Subject: backport: re PR target/59396 ([avr] Wrong warning with ISR() and -flto) X-Git-Tag: releases/gcc-4.7.4~200 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf00ff9b1fce5bca5c5846d067271d0b1e8a4029;p=thirdparty%2Fgcc.git backport: re PR target/59396 ([avr] Wrong warning with ISR() and -flto) Backport from 2014-03-14 trunk r208562. 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: r208565 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 24aa9e7ecdcc..73d19db37753 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2014-03-14 Georg-Johann Lay + + Backport from 2014-03-14 trunk r208562. + + 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-02-24 John David Anglin * config/pa/pa.c (pa_output_move_double): Don't valididate when diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index 93a4cc2d7554..2cba13ef3266 100644 --- a/gcc/config/avr/avr.c +++ b/gcc/config/avr/avr.c @@ -552,10 +552,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. */