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

--- Comment #2 from Torbjorn SVENSSON <azoff at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #1)
> (In reply to Torbjorn SVENSSON from comment #0)
> > Note that the tests above passes for x86_64-pc-linux-gnu.
> 
> And for aarch64-unknown-linux-gnu and other targets that I've been routinely
> testing with -std=gnu++20 for years.
> 
> > It appears that the line marked for the error has shifter to be the end of 
> > the scope (or off by one?).
> 
> Yeah, that's very strange:
> 
> /build/gcc_src/libstdc++-v3/testsuite/23_containers/vector/cons/
> destructible_neg.cc:37:   required from here
> 
> It's even stranger that this only happens for gnu++20 and not gnu++17

I've bisected the destructible_debug_neg.cc test and forcing -std=gnu++20  for
each revision.
The problem appears to stem from r15-9189-ga926345f22b500.
I can't say that I understand what is happening here, but for arm-none-eabi,
before the r15-9189-ga926345f22b500, the error was on line 182 and after, it
shifted to 260. x86_64-pc-linux-gnu does not do this change, so, this is target
specific in some way.

For the destructible_neg.cc test, there is something else as
r15-9189-ga926345f22b500 does not have an impact on this test.

So, to summarize:
- Pass'es with -std=gnu++17
- Fails with -std=gnu++20
- Target specific behavior in some way.
- destructible_debug_neg.cc failure on arm-none-eabi is related to
r15-9189-ga926345f22b500

@Jonathan, does this give you some clues about what is going on?

I'll try to run another bisect for destructible_neg.cc later in the day to find
out when that starts to fail for arm-none-eabi, but this PR appears to cover 2
different issues that looked related when I created the PR.

Reply via email to