https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66815
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marxin at gcc dot gnu.org Keywords| |wrong-code Summary|Segfault with -lto and |lto and libitm are not |libitm |compatible, tm_clone_table | |is not outputed in the | |final binary Component|lto |ipa --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Patrick Marlier from comment #1) > Created attachment 35936 [details] > reduced testcase > > The .tm_clone_table section is not generated with LTO enabled. > $ gcc -fgnu-tm -O0 -flto -c -o pr66815.o pr66815.c > $ readelf -S pr66815.o | grep tm_clone_table > > So crt cannot notify TM clones to libitm. yes it does look like the table is lost. though your usage of readelf there does not show that. ~/upstream-gcc/bin/gcc -fgnu-tm -O0 -flto -save-temps t.c -v grep tm_clone_table a*.s Should show that tm_clone_table in one of the .s files but does not. Removing -flto we get: a-t.s: .section .tm_clone_table,"aw"