https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98504
--- Comment #3 from Ian Lance Taylor <ian at airs dot com> --- Maybe I'm missing something obvious, but I don't see how this is possible. The code in the Go frontend is if (suffix.compare(2, 5, "thunk") == 0 && Gogo::is_digits(suffix.substr(7))) return pos; The crash is apparently occurring on the call to suffix.substr(7). Given that suffix.compare already worked, there should be no way that that code could crash. So to me this looks like a miscompilation of the Go frontend code, rather than a bug in the Go frontend.