diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-03-03 04:28:25 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-03-03 04:28:25 +0000 |
commit | 0ab09e06d618409b65c18bfe36d4a7b5166355d2 (patch) | |
tree | c77f49c08b9271ddc951203bd632b0404a669ee0 /gcc/go/gofrontend/statements.cc | |
parent | 811ad2eb7a6bc17652562c391c803e23ad7ec1d6 (diff) | |
download | gcc-0ab09e06d618409b65c18bfe36d4a7b5166355d2.tar.gz |
Make sure variable type is determined when var initialized to var.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170643 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/go/gofrontend/statements.cc')
-rw-r--r-- | gcc/go/gofrontend/statements.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/go/gofrontend/statements.cc b/gcc/go/gofrontend/statements.cc index f8f54c4dcd7..c443519b77d 100644 --- a/gcc/go/gofrontend/statements.cc +++ b/gcc/go/gofrontend/statements.cc @@ -970,7 +970,7 @@ Tuple_map_assignment_statement::do_lower(Gogo*, Block* enclosing) param_types->push_back(Typed_identifier("val", pval_type, bloc)); Typed_identifier_list* ret_types = new Typed_identifier_list(); - ret_types->push_back(Typed_identifier("", Type::make_boolean_type(), bloc)); + ret_types->push_back(Typed_identifier("", Type::lookup_bool_type(), bloc)); Function_type* fntype = Type::make_function_type(NULL, param_types, ret_types, bloc); @@ -2026,7 +2026,7 @@ Thunk_statement::build_struct(Function_type* fntype) // we add an argument when building recover thunks. Handle that // here. fields->push_back(Struct_field(Typed_identifier("can_recover", - Type::make_boolean_type(), + Type::lookup_bool_type(), location))); } @@ -2103,7 +2103,7 @@ Thunk_statement::build_thunk(Gogo* gogo, const std::string& thunk_name, // return value, to disable tail call optimizations which will // break the way we check whether recover is permitted. thunk_results = new Typed_identifier_list(); - thunk_results->push_back(Typed_identifier("", Type::make_boolean_type(), + thunk_results->push_back(Typed_identifier("", Type::lookup_bool_type(), location)); } @@ -2135,7 +2135,7 @@ Thunk_statement::build_thunk(Gogo* gogo, const std::string& thunk_name, Typed_identifier_list* result_types = new Typed_identifier_list(); result_types->push_back(Typed_identifier("", - Type::make_boolean_type(), + Type::lookup_bool_type(), bloc)); Function_type* t = Type::make_function_type(NULL, param_types, |