https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64053
Georg-Johann Lay <gjl at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |DUPLICATE Status|NEW |RESOLVED --- Comment #3 from Georg-Johann Lay <gjl at gcc dot gnu.org> --- As the test case suggests, the issue is to use a static function or method as an interrupt handler. This has been added as PR116056 which allows to specify the IRQ number as an argument to the "signal" function attribute. Hence while not strictly the same issue, the desired code can be formulated using PR116056: template<unsigned N> struct ISR { static void handler(); }; template<> [[gnu::signal(2)]] [[gnu::signal(3)]] void ISR<1>::handler() { __asm ("nop"); } The generated assembly will be something like: _ZN3ISRILj1EE7handlerEv: .global __vector_3 __vector_3 = _ZN3ISRILj1EE7handlerEv .global __vector_2 __vector_2 = _ZN3ISRILj1EE7handlerEv __gcc_isr 1 /* #APP */ nop /* #NOAPP */ __gcc_isr 2 reti __gcc_isr 0,r0 *** This bug has been marked as a duplicate of bug 116056 ***