diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2016-12-30 18:03:39 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2016-12-30 18:03:39 +0000 |
commit | 7d5c50520a289b057adacce0966616e35ef7c5a0 (patch) | |
tree | 201fce031856c78b94aa792210f33faa799fae1b /gcc/go | |
parent | 9085a4c146a875be4b980241cd8d761b8f12a6f1 (diff) | |
download | gcc-7d5c50520a289b057adacce0966616e35ef7c5a0.zip gcc-7d5c50520a289b057adacce0966616e35ef7c5a0.tar.gz gcc-7d5c50520a289b057adacce0966616e35ef7c5a0.tar.bz2 |
compile: add type conversion in Type::gc_symbol_pointer
Wrap the return from Type::gc_symbol_pointer with a type conversion to
uintptr, since the values returned are stored into structure fields
with that type.
Reviewed-on: https://go-review.googlesource.com/34625
From-SVN: r243978
Diffstat (limited to 'gcc/go')
-rw-r--r-- | gcc/go/gofrontend/MERGE | 2 | ||||
-rw-r--r-- | gcc/go/gofrontend/types.cc | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 9392c94..b03fb62 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -d9be5f5d7907cbc169424fe2b8532cc3919cad5b +ebe9d824adca053066837b8b19461048ced34aff 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/types.cc b/gcc/go/gofrontend/types.cc index 93d7d80..e7fe326 100644 --- a/gcc/go/gofrontend/types.cc +++ b/gcc/go/gofrontend/types.cc @@ -2138,7 +2138,10 @@ Type::gc_symbol_pointer(Gogo* gogo) Location bloc = Linemap::predeclared_location(); Bexpression* var_expr = gogo->backend()->var_expression(t->gc_symbol_var_, VE_rvalue, bloc); - return gogo->backend()->address_expression(var_expr, bloc); + Bexpression* addr_expr = + gogo->backend()->address_expression(var_expr, bloc); + Btype* ubtype = Type::lookup_integer_type("uintptr")->get_backend(gogo); + return gogo->backend()->convert_expression(ubtype, addr_expr, bloc); } // A mapping from unnamed types to GC symbol variables. |