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

--- Comment #3 from Lars Gullik Bjønnes <larsbj at gullik dot org> ---
I cannot send you the unreduced preprocessed code and I have failed at creating
a small
snippet that produces the error.

This is the compiler output though.
Something might be gleaned from that.

In function ‘constexpr decltype (::new(void*(0)) _Tp) std::construct_at(_Tp*,
_Args&& ...) [with _Tp = unsigned int; _Args = {unsigned int}]’,
    inlined from ‘static constexpr void
std::allocator_traits<std::allocator<_CharT> >::construct(allocator_type&,
_Up*, _Args&& ...) [with _Up = unsigned int; _Args = {unsigned int}; _Tp =
unsigned int]’ at /usr/include/c++/12/bits/alloc_traits.h:518:21,
    inlined from ‘constexpr std::vector<_Tp, _Alloc>::reference
std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {unsigned
int}; _Tp = unsigned int; _Alloc = std::allocator<unsigned int>]’ at
/usr/include/c++/12/bits/vector.tcc:117:30,
    inlined from ‘constexpr void std::vector<_Tp,
_Alloc>::push_back(value_type&&) [with _Tp = unsigned int; _Alloc =
std::allocator<unsigned int>]’ at
/usr/include/c++/12/bits/stl_vector.h:1294:21,
    inlined from ‘rtcp::RTCPfeedback<T>::RTCPfeedback(int,
std::initializer_list<unsigned int>) [with RTCP_PACKET_TYPE T = RTCP_PT_RR]’ at
functional/protocols/rtpshared/api/rtp/rtcppacket.hpp:27:20,
    inlined from ‘rtcp::RTCPfeedback<RTCP_PT_RR> rtcp::makeEmptyRR(uint32_t)’
at functional/protocols/rtpshared/rtcppacket.cpp:15:53:
/usr/include/c++/12/bits/stl_construct.h:97:14: warning: array subscript 1 is
outside array bounds of ‘unsigned int [1]’ [-Warray-bounds]
   97 |     { return ::new((void*)__location)
_Tp(std::forward<_Args>(__args)...); }
      |             
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from
/usr/include/c++/12/x86_64-redhat-linux/bits/c++allocator.h:33,
                 from /usr/include/c++/12/bits/allocator.h:46,
                 from /usr/include/c++/12/string:41:
In member function ‘_Tp* std::__new_allocator<_Tp>::allocate(size_type, const
void*) [with _Tp = unsigned int]’,
    inlined from ‘constexpr _Tp* std::allocator< <template-parameter-1-1>
>::allocate(std::size_t) [with _Tp = unsigned int]’ at
/usr/include/c++/12/bits/allocator.h:188:40,
    inlined from ‘static constexpr _Tp*
std::allocator_traits<std::allocator<_CharT> >::allocate(allocator_type&,
size_type) [with _Tp = unsigned int]’ at
/usr/include/c++/12/bits/alloc_traits.h:464:28,
    inlined from ‘constexpr std::_Vector_base<_Tp, _Alloc>::pointer
std::_Vector_base<_Tp, _Alloc>::_M_allocate(std::size_t) [with _Tp = unsigned
int; _Alloc = std::allocator<unsigned int>]’ at
/usr/include/c++/12/bits/stl_vector.h:378:33,
    inlined from ‘constexpr std::_Vector_base<_Tp, _Alloc>::pointer
std::_Vector_base<_Tp, _Alloc>::_M_allocate(std::size_t) [with _Tp = unsigned
int; _Alloc = std::allocator<unsigned int>]’ at
/usr/include/c++/12/bits/stl_vector.h:375:7,
    inlined from ‘constexpr void std::vector<_Tp,
_Alloc>::_M_range_initialize(_ForwardIterator, _ForwardIterator,
std::forward_iterator_tag) [with _ForwardIterator = const unsigned int*; _Tp =
unsigned int; _Alloc = std::allocator<unsigned int>]’ at
/usr/include/c++/12/bits/stl_vector.h:1687:25,
    inlined from ‘constexpr std::vector<_Tp,
_Alloc>::vector(std::initializer_list<_Tp>, const allocator_type&) [with _Tp =
unsigned int; _Alloc = std::allocator<unsigned int>]’ at
/usr/include/c++/12/bits/stl_vector.h:677:21,
    inlined from ‘rtcp::RTCPfeedback<T>::RTCPfeedback(int,
std::initializer_list<unsigned int>) [with RTCP_PACKET_TYPE T = RTCP_PT_RR]’ at
functional/protocols/rtpshared/api/rtp/rtcppacket.hpp:26:7,
    inlined from ‘rtcp::RTCPfeedback<RTCP_PT_RR> rtcp::makeEmptyRR(uint32_t)’
at functional/protocols/rtpshared/rtcppacket.cpp:15:53:
/usr/include/c++/12/bits/new_allocator.h:137:48: note: at offset 4 into object
of size 4 allocated by ‘operator new’
  137 |         return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n *
sizeof(_Tp)));
      |                                  ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~

Reply via email to