OSDN Git Service

Backport from 2014-03-14 trunk r208562.
authorgjl <gjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 14 Mar 2014 09:52:07 +0000 (09:52 +0000)
committergjl <gjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 14 Mar 2014 09:52:07 +0000 (09:52 +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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@208565 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 24aa9e7..73d19db 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 93a4cc2..2cba13e 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.  */