compiler: make sure type descriptor initializers go in .rodata
commitee200713c739fde7ba74f1c2f750e659a098d2d1
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 9 Sep 2018 13:26:17 +0000 (9 13:26 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 9 Sep 2018 13:26:17 +0000 (9 13:26 +0000)
treed86d734cb4c7d27b3d328f32d6c58a8e73202e07
parentb638e88c966869acd9c25dad07ecae2fc8e80982
compiler: make sure type descriptor initializers go in .rodata

    When creating type descriptor variables, the compiler (specifically
    Type::make_type_descriptor_var) invokes the immutable_struct() and
    immutable_struct_set_init() back end methods, so as to insure that
    these items go into the ".rodata" section of the generate object file.
    The expression initializers for these variables can contain nested
    subexpressions, however, and these subexpressions were not always
    being placed into .rodata. This patch changes the backend-gen code for
    slice initializers to emit implicit variables into .rodata if those
    initializers are part of a type descriptor init.

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

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