Hello, when compiling this code: procedure My_int; pragma Machine_Attribute (My_int, "signal"); pragma Export (C, My_int, "__vector_1"); procedure My_int is begin null; end; with avr-gcc-4.x I get this warning: demo_ada.adb:9: warning: `demo_ada__my_int' appears to be a misspelled signal handler I do not get this warning with gcc-3.4.x. IMO, this is caused by the misspelled-signames patch from Theodore A. Roth: avr.c: [...] { const char *func_name = IDENTIFIER_POINTER (DECL_NAME (*node)); const char *attr = IDENTIFIER_POINTER (name); /* If the function has the 'signal' or 'interrupt' attribute, test to make sure that the name of the function is "__vector_NN" so as to catch when the user misspells the interrupt vector name. */ if (strncmp (attr, "interrupt", strlen ("interrupt")) == 0) { if (strncmp (func_name, "__vector", strlen ("__vector")) != 0) { warning (0, "%qs appears to be a misspelled interrupt handler", func_name); [...] Ted's patch is a bit too C specific, because it assumes that the source code function name is equal the symbol name. (__vector_1 = __vector_1) In Ada, the source code function name (demo_ada__my_int) for interrupts is translated to__vector_xx with the "Pragma Export (..)" statement. Its not possible to define "__vector_1" as a source code function name.
Created attachment 10516 [details] proposed patch patch to replace DECL_NAME by DECL_ASSEMBLER_NAME
Confirmed, it also can be reproduced with normal C and using asm on the function to change what the assembly name is.
Won't fix in GCC-4.0.x. Adjusting milestone.
Subject: Bug 25448 Author: aesok Date: Thu Apr 5 16:43:35 2007 New Revision: 123519 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123519 Log: PR target/25448 * config/avr/avr.c (avr_handle_fndecl_attribute): Use the DECL_ASSEMBLER_NAME, not the DECL_NAME. Modified: trunk/gcc/ChangeLog trunk/gcc/config/avr/avr.c
Subject: Bug 25448 Author: aesok Date: Thu Apr 5 16:50:27 2007 New Revision: 123520 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123520 Log: PR target/25448 * config/avr/avr.c (avr_handle_fndecl_attribute): Use the DECL_ASSEMBLER_NAME, not the DECL_NAME. Modified: branches/gcc-4_2-branch/gcc/ChangeLog branches/gcc-4_2-branch/gcc/config/avr/avr.c
Subject: Bug 25448 Author: aesok Date: Thu Apr 5 16:56:43 2007 New Revision: 123521 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123521 Log: PR target/25448 * config/avr/avr.c (avr_handle_fndecl_attribute): Use the DECL_ASSEMBLER_NAME, not the DECL_NAME. Modified: branches/gcc-4_1-branch/gcc/ChangeLog branches/gcc-4_1-branch/gcc/config/avr/avr.c
Fixsed in 4.1.3, 4.2 and 4.3.