https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104564
Bug ID: 104564 Summary: '-fcompare-debug' failure w/ -std=c++20 -O1 -fharden-conditional-branches -fopenacc -gno-statement-frontiers Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: compare-debug-failure Severity: normal Priority: P3 Component: debug Assignee: unassigned at gcc dot gnu.org Reporter: asolokha at gmx dot com Target Milestone: --- Target: aarch64-linux-gnu gcc 12.0.1 20220213 snapshot (g:58aeb75d4097010ad9bb72b964265b18ab284f93) fails -fcompare-debug check when compiling the following testcase, partially reduced from libstdc++-v3/testsuite/25_algorithms/inplace_merge/1.cc, w/ -std=c++20 -O1 -fharden-conditional-branches -fopenacc -gno-statement-frontiers: #include <algorithm> #include <testsuite_iterators.h> typedef __gnu_test::test_container<int, __gnu_test::bidirectional_iterator_wrapper> container; void test1() { int array[] = {}; container con2(array, array); std::inplace_merge(con2.begin(), con2.begin(), con2.end()); } % aarch64-linux-gnu-g++-12.0.1 -std=c++20 -O1 -fcompare-debug -fharden-conditional-branches -fopenacc -gno-statement-frontiers -c bdxhor92.cc aarch64-linux-gnu-g++-12.0.1: error: bdxhor92.cc: '-fcompare-debug' failure It is very fragile, even adding -save-temps makes the failure disappear, so I could not reduce it any further. If I get the dumps right, the difference starts in einline.