https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120987

--- Comment #43 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #38)
> (In reply to Richard Biener from comment #37)
> > Should be fixed on trunk.  Tom, can you confirm?
> > 
> > I'll take care of backporting together with the other fix in the same
> > function.
> 
> As mentioned before, the problem doesn't triggers with GCC 15.1 and later
> for the original trigger setup: the gdb build.
> 
> So I took test-2.c (naming it test.c here) from this PR, and on Tumbleweed
> did:
> ...
> $ g++-14 --version
> g++-14 (SUSE Linux) 14.3.1 20260202 [revision
> ed5f89a2062002f5dfb69aac8cb36c629d091105]
> 
> $ g++-15 --version
> g++-15 (SUSE Linux) 15.2.1 20260202
> 
> $ g++-16 --version
> g++-16 (SUSE Linux) 16.0.1 20260318 (experimental)
> 
> $ for n in 0 1 2; do g++-14 test.c -O$n; ./a.out ; echo $?; done
> 0
> 1
> 1
> 
> $ for n in 0 1 2; do g++-15 test.c -O$n; ./a.out ; echo $?; done
> 0
> 1
> 1
> 
> $ for n in 0 1 2; do g++-16 test.c -O$n; ./a.out ; echo $?; done
> 0
> 0
> 0
> 
> $
> ...
> 
> That confirms that the problem indeed is fixed on GCC trunk, while still
> reproducing for those particular g++ 14/15 versions (so I'm assuming they
> don't have the fix yet). 
> 

Those now pass with g++14/15/16, for both test.c and test-2.c.

> I've just checked out gdb trunk, reverted the workaround patch, build gdb
> with g++ 14 using the script listed in comment 0, and the problem still
> reproduces.
> 
> So, once g++-14 is fixed, I could try the gdb build again.

I've tried the gdb build with the following configurations:
- 16.3, g++-14: doesn't reproduce
- trunk with workaround reverted, g++-14: doesn't reproduce
- trunk with workaround reverted, g++-16: doesn't reproduce
- 17.2 with workaround reverted, g++-14: doesn't reproduce
- 17.2 with workaround reverted, g++-16: doesn't reproduce

I think that confirms that as far as this bug report is concerned, it's fixed.

The gdb PR just got reopened, so we'll have to look into that.

Reply via email to