https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111073
--- Comment #5 from Simon Marchi <simon.marchi at polymtl dot ca> --- Created attachment 58840 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58840&action=edit creduced example To build the creduced example: $ g++ -x c++ -Wall -Werror -g3 -O2 -c creduced.cpp Note that I didn't include -D_GLIBCXX_DEBUG here. I still see the error, perhaps it means my libstdc++ has _GLIBCXX_ASSERTIONS enabled by default like Sam, not sure. There are a bunch of other errors, but the last one is the same as I pasted before: creduced.cpp:45:24: error: ‘void* __builtin_memmove(void*, const void*, long unsigned int)’ forming offset 16 is out of the bounds [0, 16] [-Werror=array-bounds=] 45 | __builtin_memmove(db, cm, sizeof(c) * dc); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ Note: I don't know if this is actually a bug, I don't understand what's going on, it just looks like one of those -Warray-bounds false positives. And if it's not a -Warray-bounds bug, then it means it's probably a libstdc++ bug, so a bug either way.