]> 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:41:51 +0000 (09:41 +0000)
committerGeorg-Johann Lay <gjl@gcc.gnu.org>
Fri, 14 Mar 2014 09:41:51 +0000 (09:41 +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: r208564

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

index 00604ecb0586d742a8574166b8bc714186607f79..b6d7f7e687d1cb26aafd20c75c76827b8e58e81f 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-03-13  Georg-Johann Lay  <avr@gjlay.de>
 
        Backport from 2014-03-13 trunk r208532.
index 90c41a38520f98c4a8304ec1c34cdd72e1737193..44d8a83e5eac33414d6fc8f49e7364c20dccb39d 100644 (file)
@@ -587,10 +587,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.  */