]> git.ipfire.org Git - thirdparty/gcc.git/commit
compiler: emit underlying constant in array_type length export
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 6 Mar 2019 20:40:32 +0000 (20:40 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 6 Mar 2019 20:40:32 +0000 (20:40 +0000)
commit6a7ceb2651b2e8f3862178b7e1845bf6f45fc18b
tree1881b8081cd0813196d30ec6ed6b1ec429981903
parentbc17f5fddc3e87ff0691c6e7e94c09dcd4dab771
compiler: emit underlying constant in array_type length export

    In Array_type::do_export, when emitting a concrete array length,
    evaluate the length expression to an integer constant and emit that
    constant, instead of calling the more general method for emitting
    expressions. This is to avoid the possibility that we will need
    to emit a conversion, which could confuse the gccgoimporter.

    Fixes golang/go#30628.

    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/165741

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