Code to reproduce: #include <memory> #include <condition_variable> struct a { }; void b() { std::shared_ptr<a>{nullptr, [](a*) {}}; } Command to reproduce: g++-16 -std=c++11 -Wall -Wextra -Warray-bounds -o /tmp/a.o -c /tmp/a.cpp -O2 godbolt: https://godbolt.org/z/EM5Trbes6 Output: /cefs/b6/b6a171e3e22b9ae35ef1d360_gcc-trunk-20260201/include/c++/16.0.1/bits/stl_construct.h:166:7: warning: array subscript 'std::mutex[0]' is partly outside array bounds of 'unsigned char [24]' [-Warray-bounds=] 166 | __pointer->~_Tp(); | ^~~~~~~~~
Yes it is a dup of bug 122197. *** This bug has been marked as a duplicate of bug 122197 ***