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

--- Comment #3 from Lux Evening <luxeveningduval at gmail dot com> ---
(In reply to Sam James from comment #2)
> Dupe.
> 
> *** This bug has been marked as a duplicate of bug 126848 ***

Hello Sam James.

I have just finished compiling a development build of GCC and I can verbatim
reproduce this bug on GCC's `master` branch at
`b70a80cfff503060f48a12c090e5b4983d3c6156`, which is several commits after the
committing of bug 126848's P2795R5 at
`cb9d160c4dab693a3fc214736db2441ebbee6c35`. This as well as the description of
126848 leads me to believe it is not related to the bug reported there. I will
leave it to you to remove the "RESOLVED" status if you believe it not to be
case as I am not 100% confident my process is outside of the realm of user
error.

I would like to confirm my findings are accurate so may I ask that you please
assess for yourself whether the current `master` build of GCC is able to
compile this code with the provided flags on your machine? To specify, the
provided flags and cases less specifically detailed in the original report are:

1. `g++ error.cpp -std=c++26 -Wuninitialized -O0`, works, program output prints
123 and 456.
2. `g++ error.cpp -std=c++26 -Wuninitialized -O1`, warning on compilation,
incorrect output printed (all zeros). This is the reported bug.

I should probably have noted in the original report that the example,
error-producing code was a minimal example for this particular bug and not my
actual user code. I could not reduce the code's complexity any further to
achieve the same error.

Kind regards,
LED

Reply via email to