https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126526
Bug ID: 126526
Summary: [16, X86] Bootstrap comparison failure!
Product: gcc
Version: 16.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: bootstrap
Assignee: unassigned at gcc dot gnu.org
Reporter: ojab at ojab dot ru
Target Milestone: ---
Created attachment 65186
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=65186&action=edit
.bad_compare
Linux x86_64, gcc-16.1.0 and `releases/gcc-16` branch
(`f1c1322dca42d88edef68762ab52a4c6aacd218a`) configured with
`../configure --prefix=/usr --enable-languages=c,c++,go --enable-default-pie
--enable-default-ssp --enable-host-pie --disable-multilib --disable-fixincludes
--with-system-zlib --disable-libssp`
both fails with `Bootstrap comparison failure!` between stages 2 and 3
(`.bad_compare` in the attached file).
It's slightly modified & automated Linux from Scratch build and host is
`x86_64-lfs-linux-gnu`, target is `x86_64-pc-linux-gnu`.
GCC-15.3.0 bootstraps fine with the same scripts.
The minimal diff is for `collect-utils.o` and preprocessed source is the same
for stage 2 and 3.
AFAICS all the failures are in debug sections, diff (`objdump -xD`):
```diff
diff --git a/tmp/2 b/tmp/3
index b88a8659141..9af1d399233 100644
--- a/tmp/2
+++ b/tmp/3
@@ -1,6 +1,6 @@
-gcc-16.1.1/build/stage2-gcc/collect-utils.o: file format elf64-x86-64
-gcc-16.1.1/build/stage2-gcc/collect-utils.o
+gcc-16.1.1/build/stage3-gcc/collect-utils.o: file format elf64-x86-64
+gcc-16.1.1/build/stage3-gcc/collect-utils.o
architecture: i386:x86-64, flags 0x00000011:
HAS_RELOC, HAS_SYMS
start address 0x0000000000000000
@@ -22855,9 +22855,9 @@ Disassembly of section .debug_loclists:
...
63c: R_X86_64_64 .text+0x710
644: 04 00 add $0x0,%al
- 646: 1f (bad)
- 647: 01 55 04 add %edx,0x4(%rbp)
- 64a: 1f (bad)
+ 646: 14 01 adc $0x1,%al
+ 648: 55 push %rbp
+ 649: 04 14 add $0x14,%al
64b: 20 04 a3 and %al,(%rbx,%riz,4)
64e: 01 55 9f add %edx,-0x61(%rbp)
651: 00 01 add %al,(%rcx)
```