https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90110
--- Comment #10 from ian at gcc dot gnu.org <ian at gcc dot gnu.org> --- Author: ian Date: Thu Apr 18 04:11:22 2019 New Revision: 270434 URL: https://gcc.gnu.org/viewcvs?rev=270434&root=gcc&view=rev Log: PR go/90110 compiler: use temporary to avoid early destruction The code was passing a substr directly to strtol, and then checking the *end value returned by strtol. But the substr could be destroyed as soon as strtol returns, making the test of *end invalid. Also fix an incorrect test of the string index rather than the value. Fixes https://gcc.gnu.org/PR90110 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/172663 Modified: trunk/gcc/go/gofrontend/MERGE trunk/gcc/go/gofrontend/import.cc