]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: re PR target/59396 ([avr] Wrong warning with ISR() and -flto)
authorGeorg-Johann Lay <avr@gjlay.de>
Fri, 14 Mar 2014 09:52:07 +0000 (09:52 +0000)
committerGeorg-Johann Lay <gjl@gcc.gnu.org>
Fri, 14 Mar 2014 09:52:07 +0000 (09:52 +0000)
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

gcc/ChangeLog
gcc/config/avr/avr.c

index 24aa9e7ecdcc84bbc4174c9293c136bdb10c68a6..73d19db377532f38cd871b6bf95a133902600212 100644 (file)
@@ -1,3 +1,12 @@
+2014-03-14  Georg-Johann Lay  <avr@gjlay.de>
+
+       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  <danglin@gcc.gnu.org>
 
        * config/pa/pa.c (pa_output_move_double): Don't valididate when
index 93a4cc2d75548f95ebb4677bdbbfa2b40d1eedc8..2cba13ef32663c6dfeb93a3928a050ac3b92f1b0 100644 (file)
@@ -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.  */