https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122610
--- Comment #11 from liu zhenyu <lzy20000419 at outlook dot com> --- Just a quick supplementary note regarding reproducibility across versions and frontends: I tested this reproducer on both GCC 15.2 and GCC Trunk, observing that the issue exhibits non-monotonic behavior and is sensitive to the frontend used. 1. Stable Reproduction at -O1 (C++): The issue is most easily reproduced using g++ at -O1. This fails consistently on both 15.2 and Trunk. This might offer a cleaner trace for debugging compared to the -O3 failure in C. 2. Regression Worsening on Trunk: While GCC 15.2 only fails at -O3 for C code, GCC Trunk now also fails at -O2 for C code, indicating the regression has widened. Summary of Results (Fail = Result > 1000): [GCC 15.2 x86-64] C : -O1(OK), -O2(OK), -O3(Fail) C++ : -O1(Fail), -O2(OK), -O3(Fail) [GCC Trunk x86-64] C : -O1(OK), -O2(Fail), -O3(Fail) <-- Worsened (Fail at -O2) C++ : -O1(Fail), -O2(Fail), -O3(OK) <-- Fluctuation likely due to interference
