https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101473
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|WAITING |NEW --- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> --- Confirmed. The difference is --- t2.g 2021-07-19 15:17:18.856725031 +0200 +++ t1.g 2021-07-19 15:17:20.632748927 +0200 @@ -1387,20 +1387,20 @@ The Directory Table (offset 0x167, lines 5, columns 1): Entry Name 0 (indirect line string, offset: 0x0): /tmp - 1 (indirect line string, offset: 0x16): /tmp/install_alternate_two/usr/local/lib64/gcc/x86_64-pc-linux-gnu/12.0.0/include - 2 (indirect line string, offset: 0x82): /usr/include/bits/types - 3 (indirect line string, offset: 0x70): /usr/include/bits - 4 (indirect line string, offset: 0x9a): /usr/include + 1 (indirect line string, offset: 0x55): /tmp/install_one/usr/local/lib64/gcc/x86_64-pc-linux-gnu/12.0.0/include + 2 (indirect line string, offset: 0x3d): /usr/include/bits/types + 3 (indirect line string, offset: 0x2b): /usr/include/bits + 4 (indirect line string, offset: 0x16): /usr/include where stddef.h is included from. I wonder how we can avoid this difference without making the DWARF "invalid" though. stddef.h is provided by the compiler. Btw, this doesn't neeed -flto to trigger it's visible with plain -g as well, it just doesn't end up in differences in the symbol table without -flto but the debug info still differs.