https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124378
Bug ID: 124378
Summary: 23_containers/vector/cons/destructible(_debug)?_neg.cc
-std=gnu++20 (test for errors, line (36|42|182))
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: azoff at gcc dot gnu.org
Target Milestone: ---
In r16-6183-ge0fa6ea45fbd02, the -std argument was changed from gnu++17 to
gnu++20. With this change, I start to see the following failures for
arm-none-eabi:
Testing cons/destructible_debug_neg.cc, -std=gnu++20
extra_tool_flags are: -std=gnu++20 -D_GLIBCXX_DEBUG
doing compile
Executing on host: arm-none-eabi-g++ -fmessage-length=0 -fno-show-column -g
-O2 -DLOCALEDIR="." -I/build/gcc_src/libstdc++-v3/testsuite/util
/build/gcc_src/libstdc++-v3/testsuite/23_containers/vector/cons/destructible_debug_neg.cc
-mthumb -march=armv6s-m -mtune=cortex-m0 -mfloat-abi=soft -mfpu=auto
-std=gnu++20 -D_GLIBCXX_DEBUG -fdiagnostics-plain-output -Wabi=20 -S -o
destructible_debug_neg.s (timeout = 360
)
spawn -ignore SIGHUP arm-none-eabi-g++ -fmessage-length=0 -fno-show-column -g
-O2 -DLOCALEDIR="." -I/build/gcc_src/libstdc++-v3/testsuite/util
/build/gcc_src/libstdc++-v3/testsuite/23_containers/vector/cons/destructible_debug_neg.cc
-mthumb -march=armv6s-m -mtune=cortex-m0 -mfloat-abi=soft -mfpu=auto
-std=gnu++20 -D_GLIBCXX_DEBUG -fdiagnostics-plain-output -Wabi=20 -S -o
destructible_debug_neg.s
pid is 2794282 -2794282
In file included from
/build/r16-7849-g1f9879e17466f5/arm-none-eabi/include/c++/16.0.1/bits/stl_iterator.h:78,
from
/build/r16-7849-g1f9879e17466f5/arm-none-eabi/include/c++/16.0.1/bits/stl_algobase.h:66,
from
/build/r16-7849-g1f9879e17466f5/arm-none-eabi/include/c++/16.0.1/vector:64,
from
/build/gcc_src/libstdc++-v3/testsuite/23_containers/vector/cons/destructible_debug_neg.cc:22:
/build/r16-7849-g1f9879e17466f5/arm-none-eabi/include/c++/16.0.1/bits/stl_construct.h:
In instantiation of 'constexpr void std::destroy_at(_Tp*) [with _Tp =
DeletedDtor]':
/build/r16-7849-g1f9879e17466f5/arm-none-eabi/include/c++/16.0.1/bits/stl_construct.h:164:
required from 'constexpr void std::_Destroy(_Tp*) [with _Tp = DeletedDtor]'
/build/r16-7849-g1f9879e17466f5/arm-none-eabi/include/c++/16.0.1/bits/stl_construct.h:226:
required from 'constexpr void std::_Destroy(_ForwardIterator,
_ForwardIterator) [with _ForwardIterator = DeletedDtor*]'
/build/r16-7849-g1f9879e17466f5/arm-none-eabi/include/c++/16.0.1/bits/alloc_traits.h:1045:
required from 'constexpr void std::_Destroy(_ForwardIterator,
_ForwardIterator, allocator<_T2>&) [with _ForwardIterator = DeletedDtor*; _Tp =
DeletedDtor]'
/build/r16-7849-g1f9879e17466f5/arm-none-eabi/include/c++/16.0.1/bits/stl_vector.h:792:
required from 'constexpr std::__cxx1998::vector<_Tp, _Alloc>::~vector() [with
_Tp = DeletedDtor; _Alloc = std::allocator<DeletedDtor>]'
/build/r16-7849-g1f9879e17466f5/arm-none-eabi/include/c++/16.0.1/debug/vector:260:
required from here
/build/r16-7849-g1f9879e17466f5/arm-none-eabi/include/c++/16.0.1/bits/stl_construct.h:88:
error: use of deleted function 'DeletedDtor::~DeletedDtor()'
/build/gcc_src/libstdc++-v3/testsuite/23_containers/vector/cons/destructible_debug_neg.cc:27:
note: declared here
/build/r16-7849-g1f9879e17466f5/arm-none-eabi/include/c++/16.0.1/bits/stl_construct.h:
In instantiation of 'constexpr void std::destroy_at(_Tp*) [with _Tp =
PrivateDtor]':
/build/r16-7849-g1f9879e17466f5/arm-none-eabi/include/c++/16.0.1/bits/stl_construct.h:164:
required from 'constexpr void std::_Destroy(_Tp*) [with _Tp = PrivateDtor]'
/build/r16-7849-g1f9879e17466f5/arm-none-eabi/include/c++/16.0.1/bits/stl_construct.h:226:
required from 'constexpr void std::_Destroy(_ForwardIterator,
_ForwardIterator) [with _ForwardIterator = PrivateDtor*]'
/build/r16-7849-g1f9879e17466f5/arm-none-eabi/include/c++/16.0.1/bits/alloc_traits.h:1045:
required from 'constexpr void std::_Destroy(_ForwardIterator,
_ForwardIterator, allocator<_T2>&) [with _ForwardIterator = PrivateDtor*; _Tp =
PrivateDtor]'
/build/r16-7849-g1f9879e17466f5/arm-none-eabi/include/c++/16.0.1/bits/stl_vector.h:792:
required from 'constexpr std::__cxx1998::vector<_Tp, _Alloc>::~vector() [with
_Tp = PrivateDtor; _Alloc = std::allocator<PrivateDtor>]'
/build/r16-7849-g1f9879e17466f5/arm-none-eabi/include/c++/16.0.1/debug/vector:260:
required from here
/build/r16-7849-g1f9879e17466f5/arm-none-eabi/include/c++/16.0.1/bits/stl_construct.h:88:
error: 'PrivateDtor::~PrivateDtor()' is private within this context
/build/gcc_src/libstdc++-v3/testsuite/23_containers/vector/cons/destructible_debug_neg.cc:31:
note: declared private here
...
compiler exited with status 1
PASS: 23_containers/vector/cons/destructible_debug_neg.cc -std=gnu++20 (test
for errors, line )
PASS: 23_containers/vector/cons/destructible_debug_neg.cc -std=gnu++20 (test
for errors, line )
FAIL: 23_containers/vector/cons/destructible_debug_neg.cc -std=gnu++20 (test
for errors, line 182)
PASS: 23_containers/vector/cons/destructible_debug_neg.cc -std=gnu++20 (test
for excess errors)
Testing cons/destructible_neg.cc, -std=gnu++20
extra_tool_flags are: -std=gnu++20
doing compile
Executing on host: arm-none-eabi-g++ -fmessage-length=0 -fno-show-column -g
-O2 -DLOCALEDIR="." -I/build/gcc_src/libstdc++-v3/testsuite/util
/build/gcc_src/libstdc++-v3/testsuite/23_containers/vector/cons/destructible_neg.cc
-mthumb -march=armv6s-m -mtune=cortex-m0 -mfloat-abi=soft -mfpu=auto
-std=gnu++20 -fdiagnostics-plain-output -Wabi=20 -S -o destructible_neg.s
(timeout = 360)
spawn -ignore SIGHUP arm-none-eabi-g++ -fmessage-length=0 -fno-show-column -g
-O2 -DLOCALEDIR="." -I/build/gcc_src/libstdc++-v3/testsuite/util
/build/gcc_src/libstdc++-v3/testsuite/23_containers/vector/cons/destructible_neg.cc
-mthumb -march=armv6s-m -mtune=cortex-m0 -mfloat-abi=soft -mfpu=auto
-std=gnu++20 -fdiagnostics-plain-output -Wabi=20 -S -o destructible_neg.s
pid is 2794785 -2794785
In file included from
/build/r16-7849-g1f9879e17466f5/arm-none-eabi/include/c++/16.0.1/bits/stl_iterator.h:78,
from
/build/r16-7849-g1f9879e17466f5/arm-none-eabi/include/c++/16.0.1/bits/stl_algobase.h:66,
from
/build/r16-7849-g1f9879e17466f5/arm-none-eabi/include/c++/16.0.1/vector:64,
from
/build/gcc_src/libstdc++-v3/testsuite/23_containers/vector/cons/destructible_neg.cc:21:
/build/r16-7849-g1f9879e17466f5/arm-none-eabi/include/c++/16.0.1/bits/stl_construct.h:
In instantiation of 'constexpr void std::destroy_at(_Tp*) [with _Tp =
DeletedDtor]':
/build/r16-7849-g1f9879e17466f5/arm-none-eabi/include/c++/16.0.1/bits/stl_construct.h:164:
required from 'constexpr void std::_Destroy(_Tp*) [with _Tp = DeletedDtor]'
/build/r16-7849-g1f9879e17466f5/arm-none-eabi/include/c++/16.0.1/bits/stl_construct.h:226:
required from 'constexpr void std::_Destroy(_ForwardIterator,
_ForwardIterator) [with _ForwardIterator = DeletedDtor*]'
/build/r16-7849-g1f9879e17466f5/arm-none-eabi/include/c++/16.0.1/bits/alloc_traits.h:1045:
required from 'constexpr void std::_Destroy(_ForwardIterator,
_ForwardIterator, allocator<_T2>&) [with _ForwardIterator = DeletedDtor*; _Tp =
DeletedDtor]'
/build/r16-7849-g1f9879e17466f5/arm-none-eabi/include/c++/16.0.1/bits/stl_vector.h:792:
required from 'constexpr std::vector<_Tp, _Alloc>::~vector() [with _Tp =
DeletedDtor; _Alloc = std::allocator<DeletedDtor>]'
/build/gcc_src/libstdc++-v3/testsuite/23_containers/vector/cons/destructible_neg.cc:37:
required from here
/build/r16-7849-g1f9879e17466f5/arm-none-eabi/include/c++/16.0.1/bits/stl_construct.h:88:
error: use of deleted function 'DeletedDtor::~DeletedDtor()'
/build/gcc_src/libstdc++-v3/testsuite/23_containers/vector/cons/destructible_neg.cc:26:
note: declared here
/build/r16-7849-g1f9879e17466f5/arm-none-eabi/include/c++/16.0.1/bits/stl_construct.h:
In instantiation of 'constexpr void std::destroy_at(_Tp*) [with _Tp =
PrivateDtor]':
/build/r16-7849-g1f9879e17466f5/arm-none-eabi/include/c++/16.0.1/bits/stl_construct.h:164:
required from 'constexpr void std::_Destroy(_Tp*) [with _Tp = PrivateDtor]'
/build/r16-7849-g1f9879e17466f5/arm-none-eabi/include/c++/16.0.1/bits/stl_construct.h:226:
required from 'constexpr void std::_Destroy(_ForwardIterator,
_ForwardIterator) [with _ForwardIterator = PrivateDtor*]'
/build/r16-7849-g1f9879e17466f5/arm-none-eabi/include/c++/16.0.1/bits/alloc_traits.h:1045:
required from 'constexpr void std::_Destroy(_ForwardIterator,
_ForwardIterator, allocator<_T2>&) [with _ForwardIterator = PrivateDtor*; _Tp =
PrivateDtor]'
/build/r16-7849-g1f9879e17466f5/arm-none-eabi/include/c++/16.0.1/bits/stl_vector.h:792:
required from 'constexpr std::vector<_Tp, _Alloc>::~vector() [with _Tp =
PrivateDtor; _Alloc = std::allocator<PrivateDtor>]'
/build/gcc_src/libstdc++-v3/testsuite/23_containers/vector/cons/destructible_neg.cc:43:
required from here
/build/r16-7849-g1f9879e17466f5/arm-none-eabi/include/c++/16.0.1/bits/stl_construct.h:88:
error: 'PrivateDtor::~PrivateDtor()' is private within this context
/build/gcc_src/libstdc++-v3/testsuite/23_containers/vector/cons/destructible_neg.cc:30:
note: declared private here
...
compiler exited with status 1
FAIL: 23_containers/vector/cons/destructible_neg.cc -std=gnu++20 (test for
errors, line 36)
FAIL: 23_containers/vector/cons/destructible_neg.cc -std=gnu++20 (test for
errors, line 42)
PASS: 23_containers/vector/cons/destructible_neg.cc -std=gnu++20 (test for
errors, line )
PASS: 23_containers/vector/cons/destructible_neg.cc -std=gnu++20 (test for
errors, line )
PASS: 23_containers/vector/cons/destructible_neg.cc -std=gnu++20 (test for
excess errors)
It appears that the line marked for the error has shifter to be the end of the
scope (or off by one?).
Note that the tests above passes for x86_64-pc-linux-gnu.