]> git.ipfire.org Git - thirdparty/gcc.git/commit
PR go/90110
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 18 Apr 2019 04:11:22 +0000 (04:11 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 18 Apr 2019 04:11:22 +0000 (04:11 +0000)
commit07f6bc2529234bf9ace882b762903fbabebeb1dc
treeb8471eb63988c582ac946e04f2ad644d953b4884
parenta9b768f8f4fd471e315623b23c4f9e83463bf92e
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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270434 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/go/gofrontend/MERGE
gcc/go/gofrontend/import.cc