From: Thomas Schwinge Date: Mon, 20 Oct 2025 15:36:49 +0000 (+0200) Subject: c++, gimplify: Implement C++26 P2795R5 - Erroneous behavior for uninitialized reads... X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=651df6b43e817a8e4b87eed9f338ea227da7bccb;p=thirdparty%2Fgcc.git c++, gimplify: Implement C++26 P2795R5 - Erroneous behavior for uninitialized reads: Adjust 'libgomp.c++/{target-flex-101.C,target-std__flat_map-concurrent.C,target-std__flat_multimap-concurrent.C}' [PR114457, PR122268, PR120450] With commit r16-4212-gf256a13f8aed833fe964a2ba541b7b30ad9b4a76 "c++, gimplify: Implement C++26 P2795R5 - Erroneous behavior for uninitialized reads [PR114457]", we acquired: {+FAIL: libgomp.c++/target-flex-101.C (internal compiler error: in assign_temp, at function.cc:990)+} [-PASS:-]{+FAIL:+} libgomp.c++/target-flex-101.C (test for excess errors) [-PASS:-]{+UNRESOLVED:+} libgomp.c++/target-flex-101.C [-execution test-]{+compilation failed to produce executable+} ... for GCN, nvptx offloading compilation, and on the other hand: [-XFAIL:-]{+XPASS:+} libgomp.c++/target-std__flat_map-concurrent.C (internal compiler error[-: in assign_temp, at function.cc:990)-] [-XFAIL:-]{+XPASS:+} libgomp.c++/target-std__flat_map-concurrent.C (test for excess errors) [-UNRESOLVED:-]{+PASS:+} libgomp.c++/target-std__flat_map-concurrent.C [-compilation failed to produce executable-]{+execution test+} [-XFAIL:-]{+XPASS:+} libgomp.c++/target-std__flat_multimap-concurrent.C (internal compiler error[-: in assign_temp, at function.cc:990)-] [-XFAIL:-]{+XPASS:+} libgomp.c++/target-std__flat_multimap-concurrent.C (test for excess errors) [-UNRESOLVED:-]{+PASS:+} libgomp.c++/target-std__flat_multimap-concurrent.C [-compilation failed to produce executable-]{+execution test+} ... for GCN offloading compilation (already PASSed for nvptx). Note that these test cases explicitly use '-std=c++23', so don't undergo the new C++26 P2795R5 functionality. Yet, comparing before vs. after that commit, in the 'gimple' dumps (that is, early host compilation), there are a lot of changes where 'gimple_assign 's and relatedly 'gimple_bind's newly appear/no longer appear elsewhere. This leads to correspondingly different code at the beginning of offloading compilation. Why/how that now ('libgomp.c++/target-flex-101.C') vs. before ('libgomp.c++/{target-std__flat_map-concurrent.C,target-std__flat_multimap-concurrent.C}') translates into 'expand' ICEs, I can't tell. PR c++/114457 PR c++/122268 PR c++/120450 libgomp/ * testsuite/libgomp.c++/target-flex-101.C: XFAIL GCN, nvptx offloading compilation. * testsuite/libgomp.c++/target-std__flat_map-concurrent.C: Un-XFAIL GCN offloading compilation. * testsuite/libgomp.c++/target-std__flat_multimap-concurrent.C: Likewise. --- diff --git a/libgomp/testsuite/libgomp.c++/target-flex-101.C b/libgomp/testsuite/libgomp.c++/target-flex-101.C index be9037e9718..28201f468b6 100644 --- a/libgomp/testsuite/libgomp.c++/target-flex-101.C +++ b/libgomp/testsuite/libgomp.c++/target-flex-101.C @@ -1,5 +1,8 @@ /* { dg-additional-options -std=c++23 } */ +/* { dg-ice {TODO PR122268} { offload_target_amdgcn || offload_target_nvptx } } + { dg-excess-errors {'mkoffload' failure etc.} { xfail { offload_target_amdgcn || offload_target_nvptx } } } */ + /* C++23 container adaptors in target region. Severely needs additional tests. */ diff --git a/libgomp/testsuite/libgomp.c++/target-std__flat_map-concurrent.C b/libgomp/testsuite/libgomp.c++/target-std__flat_map-concurrent.C index 9e59907c09b..8a3082cceda 100644 --- a/libgomp/testsuite/libgomp.c++/target-std__flat_map-concurrent.C +++ b/libgomp/testsuite/libgomp.c++/target-std__flat_map-concurrent.C @@ -2,10 +2,6 @@ // { dg-additional-options "-std=c++23" } // { dg-additional-options -DMEM_SHARED { target offload_device_shared_as } } -/* { dg-ice {TODO PR120450} { offload_target_amdgcn && { ! offload_device_shared_as } } } - { dg-excess-errors {'mkoffload' failure etc.} { xfail { offload_target_amdgcn && { ! offload_device_shared_as } } } } - (For effective-target 'offload_device_shared_as', we've got '-DMEM_SHARED', and therefore don't invoke the constructor with placement new.) */ - #include #include #include diff --git a/libgomp/testsuite/libgomp.c++/target-std__flat_multimap-concurrent.C b/libgomp/testsuite/libgomp.c++/target-std__flat_multimap-concurrent.C index 1dc60c8a627..0a1377d13c7 100644 --- a/libgomp/testsuite/libgomp.c++/target-std__flat_multimap-concurrent.C +++ b/libgomp/testsuite/libgomp.c++/target-std__flat_multimap-concurrent.C @@ -2,10 +2,6 @@ // { dg-additional-options "-std=c++23" } // { dg-additional-options -DMEM_SHARED { target offload_device_shared_as } } -/* { dg-ice {TODO PR120450} { offload_target_amdgcn && { ! offload_device_shared_as } } } - { dg-excess-errors {'mkoffload' failure etc.} { xfail { offload_target_amdgcn && { ! offload_device_shared_as } } } } - (For effective-target 'offload_device_shared_as', we've got '-DMEM_SHARED', and therefore don't invoke the constructor with placement new.) */ - #include #include #include