compiler: avoid crashing on invalid non-integer array length
commit331b2b6d79ac3020f99ca2b75ad305eb6a74935a
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 3 May 2018 17:20:44 +0000 (3 17:20 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 3 May 2018 17:20:44 +0000 (3 17:20 +0000)
treeba9e4b659a522fbb2b33848a593ea9f541faf4bc
parenta9af180e1bd42d92ab5ff002b828631ce07a50fb
compiler: avoid crashing on invalid non-integer array length

    Tweak the array type checking code to avoid crashing on array types
    whose length expressions are explicit non-integer types (for example,
    "float64(10)"). If such constructs are seen, issue an "invalid array
    bound" error.

    Fixes golang/go#13486.

    Reviewed-on: https://go-review.googlesource.com/91975

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