http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60902
--- Comment #22 from Jeffrey A. Law <law at redhat dot com> --- I'm still working my way through the code, but it looks like we're mucking up the value for "buf" and "k". Not really sure if that's the root cause is just a downstream effect. Anyway, once the buf computation goes awry bad the callers start to see unexpected results and the bogus errors.