https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104156
--- Comment #10 from rguenther at suse dot de <rguenther at suse dot de> --- On Sat, 22 Jan 2022, cnsun at uwaterloo dot ca wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104156 > > --- Comment #9 from Chengnian Sun <cnsun at uwaterloo dot ca> --- > Thanks, Andrew. > > What about -flto? Does GCC still guarantee such a compilation consistency wrt > to debug info in the presence of -flto? Yes, even with -flto we aim to produce the same code. Note I'm not 100% sure that -fcompare-debug works fine on the LTRANS level so you maybe need to adjust to -flto-partiton=none.