[Bug target/57631] New: spurious warning for avr interrupts with asm labels
pebbles at riseup dot net
gcc-bugzilla@gcc.gnu.org
Sun Jun 16 22:27:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57631
Bug ID: 57631
Summary: spurious warning for avr interrupts with asm labels
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: pebbles at riseup dot net
Hi,
Currently AVR interrupts do not mix well with asm labels, as:
// test.c ...
__attribute__((signal,used))
void __vector_1() { asm(""); }
__attribute__((signal,used))
void pretendName() asm("__vector_2");
void pretendName() { asm(""); }
// ... test.c
Gives:
$ avr-gcc test.c -S
test.c: In function ‘pretendName’:
test.c:6:6: warning: ‘pretendName’ appears to be a misspelled signal handler
[enabled by default]
'__vector_1' is accepted by the compiler fine, but 'pretendName' is rejected.
A quick view of test.s shows 'pretendName' is correctly translated to
'__vector_2'.
If one adds a main() function to test.c, links and objdumps the result, both
functions are properly inserted into the interrupt table.
There is no misspelling here. This warning should not be issued, and makes
-Werror die.
I'm on Debian Squeeze. I've tried with this version of gcc:
COLLECT_GCC=avr-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/avr/4.7.2/lto-wrapper
Target: avr
Configured with: ../src/configure -v --enable-languages=c,c++ --prefix=/usr/lib
--infodir=/usr/share/info --mandir=/usr/share/man --bindir=/usr/bin
--libexecdir=/usr/lib --libdir=/usr/lib --enable-shared --with-system-zlib
--enable-long-long --enable-nls --without-included-gettext --disable-libssp
--build=i486-linux-gnu --host=i486-linux-gnu --target=avr
Thread model: single
gcc version 4.7.2 (GCC)
And also with trunk:
Using built-in specs.
COLLECT_GCC=/home/username/build/avr-gcc-master/bin/bin/avr-gcc
COLLECT_LTO_WRAPPER=/home/username/build/avr-gcc-master/bin/libexec/gcc/avr/4.9.0/lto-wrapper
Target: avr
Configured with: src/configure -v --enable-languages=c,c++
--prefix=/home/username/build/avr-gcc-master/bin --enable-shared
--with-system-zlib --enable-long-long --enable-nls --without-included-gettext
--disable-libssp --target=avr
Thread model: single
gcc version 4.9.0 20130614 (experimental) (GCC)
More information about the Gcc-bugs
mailing list