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

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

index 8f92d2db8098c4e71745f57c67c1581cc4738eb1..f20c9de4bf1868989705d89116e3fe3e12725fbd 100644 (file)
@@ -1,3 +1,10 @@
+2014-03-14  Georg-Johann Lay  <avr@gjlay.de>
+
+       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  <rth@redhat.com>
 
        PR debug/60438
index e16f3bf058ad52f0365fe732fb19ddb747ce7199..8ca7de0b36ddc56cd8566d220d43f66732b654ca 100644 (file)
@@ -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.  */