https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117279
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I have a simple libstdc++ patch which removes the bounds checks for this
though:
```
#include <string.h>
char t;
std::string foo(int index, std::string rrr) {
if (index < 0 || index > 4) {
return 0;
}
std::string p = std::string{"AAA "} + rrr;
t = p[index];
return p;
}
```
