diff options
Diffstat (limited to 'gcc/go')
-rw-r--r-- | gcc/go/gofrontend/MERGE | 2 | ||||
-rw-r--r-- | gcc/go/gofrontend/expressions.cc | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 9495882..1ef2c8d 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -da249ffd264154cc992e76ff03f91f700d3bf53e +06e688ff6d829c8de3735e9f59b61b373afc596f The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc index 143f0a7..efc8eba 100644 --- a/gcc/go/gofrontend/expressions.cc +++ b/gcc/go/gofrontend/expressions.cc @@ -4453,7 +4453,8 @@ Unary_expression::do_get_backend(Translate_context* context) // initialize the value once, so we can use this directly // rather than copying it. In that case we can't make it // read-only, because the program is permitted to change it. - copy_to_heap = context->function() != NULL; + copy_to_heap = (context->function() != NULL + || context->is_const()); } std::string asm_name(go_selectively_encode_id(var_name)); Bvariable* implicit = |