https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122507
--- Comment #7 from LIU Hao <lh_mouse at 126 dot com> --- (In reply to Andrew Pinski from comment #2) > Yes > ``` > __asm__( > ".text \n" > ".def my_add; .scl 3; .type 32; .endef \n" > //".globl my_add \n" //////////////////////// > "my_add: \n" > " lea eax, [rcx + rdx] \n" > " ret \n" > ::":"(my_add) > ); > ``` > But that is currently not implemented with LTO. Even without LTO this effects a warning: (https://gcc.godbolt.org/z/9TaWrMhqT) ``` <source>:3:12: warning: 'my_add' used but never defined 3 | static int my_add(int x, int y); | ^~~~~~ ```'
