Configured and built with: ../gcc-4.2-20070221/configure --enable-languages=c --enable-bootstrap --disable-nls && make BOOT_CFLAGS="-gstabs" The result is: [...] Comparing stages 2 and 3 warning: ./cc1-checksum.o differs Bootstrap comparison failure! ./dbxout.o differs ./insn-emit.o differs ./varasm.o differs [...] I recompiled these sources with stage 2 and stage 3 compilers into assembly, for dbxout.c I got the following: --- dbxout-stage2.s 2007-03-16 21:27:01.000000000 +0100 +++ dbxout-stage3.s 2007-03-16 21:29:42.000000000 +0100 @@ -14245,12 +14245,12 @@ leave ret .size dbxout_block, .-dbxout_block - .stabs "begin_label:(0,39)=ar(5,28);0;19;(0,2)",128,0,0,-52 + .stabs "begin_label:(0,30)",128,0,0,-52 .stabn 192,0,0,.LFBB69-.LFBB69 .stabs "did_output:(0,1)",128,0,0,-32 .stabs "blocknum:(0,1)",128,0,0,-28 .stabn 192,0,0,.LBB180-.LFBB69 - .stabs "buf:(0,39)",128,0,0,-72 + .stabs "buf:(0,30)",128,0,0,-72 .stabs "scope_start:(10,36)",128,0,0,-24 .stabn 192,0,0,.LBB181-.LFBB69 .stabs "decl:(47,10)",128,0,0,-20 The other files differ in the same manner. It's very similar to http://gcc.gnu.org/ml/gcc/2001-09/msg00882.html.
Subject: Re: New: Bootstrap comparison failure with -gstabs On Fri, 16 Mar 2007, feri1024 at t-email dot hu wrote: > Configured and built with: > > ../gcc-4.2-20070221/configure --enable-languages=c --enable-bootstrap > --disable-nls && make BOOT_CFLAGS="-gstabs" > > The result is: > > [...] > Comparing stages 2 and 3 > warning: ./cc1-checksum.o differs > Bootstrap comparison failure! > ./dbxout.o differs > ./insn-emit.o differs > ./varasm.o differs The symptoms, including the need for a special BOOT_CFLAGS when configuring to trigger a bootstrap failure and the list of miscomparing files, seem just the same as the case I analysed and reported today as bug 31230. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31230
I was able to reproduce this on an x86_64-linux machine following the instructions. Assuming this is the same conceptual problem as 31230, I tried the same patch, in another file. Just marking the array type domain type as used so it wouldn't be garbage collected. It was a little harder here since we didn't have a convenient subroutine to call, so I had to move some code out of dbxout_type into a new function, but effectively there is only a one line actual code change here. This survived a C-only BOOT_CFLAGS=-gstabs bootstrap, which seems to be good evidence that it is working. This patch is otherwise untested. It needs a full bootstrap, gcc testsuite run, and gdb testsuite run.
Created attachment 13305 [details] Mark array TYPE_DOMAIN as used to prevent garbage collection. This has been tested with a C only BOOT_CFLAGS=-gstabs bootstrap. It needs a full bootstrap, gcc testsuite run, and gdb testsuite run.
(In reply to Jim Wilson from comment #3) > Created attachment 13305 [details] > Mark array TYPE_DOMAIN as used to prevent garbage collection. > > This has been tested with a C only BOOT_CFLAGS=-gstabs bootstrap. It needs > a full bootstrap, gcc testsuite run, and gdb testsuite run. Please submit to gcc-patches for review if it still applies.
Note that there has been discussion of deprecating stabs support recently: https://gcc.gnu.org/pipermail/gcc-patches/2017-July/479552.html
Stabs debugging support was removed r13-2361-g7e0db0cdf01e9c so closing as won't fix.