Commit c36cc670 by Ian Lance Taylor

compiler: Fix multiple conversions to different named slices.

From-SVN: r182293
parent 0f8fa9b6
...@@ -3669,7 +3669,7 @@ Type_conversion_expression::do_get_tree(Translate_context* context) ...@@ -3669,7 +3669,7 @@ Type_conversion_expression::do_get_tree(Translate_context* context)
if (e->integer_type()->is_unsigned() if (e->integer_type()->is_unsigned()
&& e->integer_type()->bits() == 8) && e->integer_type()->bits() == 8)
{ {
static tree string_to_byte_array_fndecl; tree string_to_byte_array_fndecl = NULL_TREE;
ret = Gogo::call_builtin(&string_to_byte_array_fndecl, ret = Gogo::call_builtin(&string_to_byte_array_fndecl,
this->location(), this->location(),
"__go_string_to_byte_array", "__go_string_to_byte_array",
...@@ -3681,7 +3681,7 @@ Type_conversion_expression::do_get_tree(Translate_context* context) ...@@ -3681,7 +3681,7 @@ Type_conversion_expression::do_get_tree(Translate_context* context)
else else
{ {
go_assert(e == Type::lookup_integer_type("int")); go_assert(e == Type::lookup_integer_type("int"));
static tree string_to_int_array_fndecl; tree string_to_int_array_fndecl = NULL_TREE;
ret = Gogo::call_builtin(&string_to_int_array_fndecl, ret = Gogo::call_builtin(&string_to_int_array_fndecl,
this->location(), this->location(),
"__go_string_to_int_array", "__go_string_to_int_array",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment