https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78098
--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> ---
Another problem:
[hjl@gnu-6 pr78098]$ cat foo2.i
void bar (int);
void foo1 (void *p)
{
bar (0);
*((int *)0xFEE00080) = 0;
}
__attribute__((interrupt)) void foo2 (void *p)
{
bar (0);
*((int *)0xFEE00080) = 0;
}
[hjl@gnu-6 pr78098]$ make foo2.s
/export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc/build-x86_64-linux/gcc/ -Os -DQM_LAKEMONT -m32 -miamcu
-mno-sse -mno-mmx -mno-80387 -S -o foo2.s foo2.i
foo2.i: In function ‘foo1’:
foo2.i:3:6: error: interrupt service routine can't be called directly
void foo1 (void *p)
^~~~
Makefile:33: recipe for target 'foo2.s' failed
make: *** [foo2.s] Error 1
[hjl@gnu-6 pr78098]$
Can ICF turn foo1 into a tail call to foo2 when foo2 has an interrupt
attribute?