]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: re PR target/57631 (Use assembler name for sanity checking of ISR names...
authorGeorg-Johann Lay <avr@gjlay.de>
Thu, 11 Jul 2013 08:50:09 +0000 (08:50 +0000)
committerGeorg-Johann Lay <gjl@gcc.gnu.org>
Thu, 11 Jul 2013 08:50:09 +0000 (08:50 +0000)
Backport from 2013-07-11 trunk r200901.
PR target/57631
* config/avr/avr.c (avr_set_current_function): Sanity-check signal
name seen by assembler/linker if available.

From-SVN: r200903

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

index 907e3b7d4196992fd3ce8af9df00ae0eece3537f..cca738fbeacf12aa9ba0222a8aaf59cca28bf8f5 100644 (file)
@@ -1,3 +1,11 @@
+2013-07-11  Georg-Johann Lay  <avr@gjlay.de>
+
+       Backport from 2013-07-11 trunk r200901.
+
+       PR target/57631
+       * config/avr/avr.c (avr_set_current_function): Sanity-check signal
+       name seen by assembler/linker if available.
+
 2013-07-10  Georg-Johann Lay  <avr@gjlay.de>
 
        Backport from 2013-07-10 trunk r200872.
index bac87e8e174fff0f4975c30caa7726052e65c4c6..93a4cc2d75548f95ebb4677bdbbfa2b40d1eedc8 100644 (file)
@@ -549,7 +549,12 @@ avr_set_current_function (tree decl)
     {
       tree args = TYPE_ARG_TYPES (TREE_TYPE (decl));
       tree ret = TREE_TYPE (TREE_TYPE (decl));
-      const char *name = IDENTIFIER_POINTER (DECL_NAME (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_NAME (decl));
       
       /* Silently ignore 'signal' if 'interrupt' is present.  AVR-LibC startet
          using this when it switched from SIGNAL and INTERRUPT to ISR.  */