https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66784
Bug ID: 66784 Summary: no symbol emitted for builtin with lto Product: gcc Version: lto Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: guido.hatzsis at yandex dot com Target Milestone: --- No symbols are emitted when compiling a built-in with -flto. eg: # cat << __EOF > bar.i _Complex float __mulsc3(float x, float y, float z, float a) { return -1.0; } __EOF # rm bar.o ; gcc -c bar.i ; gcc-nm bar.o 0000000000000000 T __mulsc3 # rm bar.o ; gcc -flto -c bar.i ; gcc-nm bar.o /usr/lib/gcc/x86_64-pc-linux-gnu/5.1.0/../../../../x86_64-pc-linux-gnu/bin/nm: bar.o: no symbols # cat << __EOF > bar.i void __mulsc3(float x, float y, float z, float a) { } __EOF # rm bar.o ; gcc -flto -c bar.i ; gcc-nm bar.o bar.i:1:6: warning: conflicting types for built-in function ‘__mulsc3’ void __mulsc3(float x, float y, float z, float a) { } ^ 00000000 T __mulsc3