https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122197
--- Comment #19 from Barnabás Pőcze <pobrn at protonmail dot com> ---
I think I see something... `std::conditional_variable_any` has an
`std::shared_ptr<std::mutex>`, here is a reduced test case that produces the
same warning:
```cpp
#include <memory>
#include <mutex>
void f();
void f()
{
std::make_shared<std::mutex>(); // IF COMMENTED OUT, NO WARNING
std::make_shared<int>();
}
```
> I don't see how we can add a kluge to the libstdc++ headers to stop GCC being
> confused about this
Would it not be sufficient to copy/move the `-Warray-bounds` suppression from
`~_Sp_counted_ptr_inplace()` into `_M_dispose()` of the same type? Compiles for
me after that change.