https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78098
--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> --- (In reply to Martin Liška from comment #4) > Hello H.J. > As interrupt handler attribute is very specific and rare attribute, I'm > suggesting to basically skip all functions in IPA ICF analysis that have > such attribute. > > Does it work for you? I'd like to keep it as a "feature" to detect code duplication in interrupt handler, like [hjl@gnu-6 pr78098]$ /export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc -B/export/build/gnu/gcc/build-x86_64-linux/gcc/ -Os -m32 -mno-sse -mno-mmx -mno-80387 -S -o foo1.s foo1.i foo1.i: In function ‘foo1’: foo1.i:10:33: error: interrupt service routine ‘foo2’ can't be called directly __attribute__((interrupt)) void foo2 (void *p) ^~~~ foo1.i:10:33: note: is interrupt service routine ‘foo1’ identical to ‘foo2’? [hjl@gnu-6 pr78098]$