diff options
Diffstat (limited to 'gcc-4.9/gcc/go/gofrontend')
-rw-r--r-- | gcc-4.9/gcc/go/gofrontend/expressions.cc | 7 | ||||
-rw-r--r-- | gcc-4.9/gcc/go/gofrontend/gogo.cc | 5 | ||||
-rw-r--r-- | gcc-4.9/gcc/go/gofrontend/import-archive.cc | 9 |
3 files changed, 15 insertions, 6 deletions
diff --git a/gcc-4.9/gcc/go/gofrontend/expressions.cc b/gcc-4.9/gcc/go/gofrontend/expressions.cc index f45b4a2..b0b8e39 100644 --- a/gcc-4.9/gcc/go/gofrontend/expressions.cc +++ b/gcc-4.9/gcc/go/gofrontend/expressions.cc @@ -5341,10 +5341,13 @@ Binary_expression::do_lower(Gogo* gogo, Named_object*, // Lower struct, array, and some interface comparisons. if (op == OPERATOR_EQEQ || op == OPERATOR_NOTEQ) { - if (left->type()->struct_type() != NULL) + if (left->type()->struct_type() != NULL + && right->type()->struct_type() != NULL) return this->lower_struct_comparison(gogo, inserter); else if (left->type()->array_type() != NULL - && !left->type()->is_slice_type()) + && !left->type()->is_slice_type() + && right->type()->array_type() != NULL + && !right->type()->is_slice_type()) return this->lower_array_comparison(gogo, inserter); else if ((left->type()->interface_type() != NULL && right->type()->interface_type() == NULL) diff --git a/gcc-4.9/gcc/go/gofrontend/gogo.cc b/gcc-4.9/gcc/go/gofrontend/gogo.cc index 9739f28..f042f64 100644 --- a/gcc-4.9/gcc/go/gofrontend/gogo.cc +++ b/gcc-4.9/gcc/go/gofrontend/gogo.cc @@ -255,10 +255,7 @@ Gogo::pkgpath_for_symbol(const std::string& pkgpath) char c = s[i]; if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') - || (c >= '0' && c <= '9') - || c == '_' - || c == '.' - || c == '$') + || (c >= '0' && c <= '9')) ; else s[i] = '_'; diff --git a/gcc-4.9/gcc/go/gofrontend/import-archive.cc b/gcc-4.9/gcc/go/gofrontend/import-archive.cc index 34fb528..a902cfa 100644 --- a/gcc-4.9/gcc/go/gofrontend/import-archive.cc +++ b/gcc-4.9/gcc/go/gofrontend/import-archive.cc @@ -295,6 +295,15 @@ Archive_file::interpret_header(const Archive_header* hdr, off_t off, // This is the symbol table. pname->clear(); } + else if (hdr->ar_name[1] == 'S' && hdr->ar_name[2] == 'Y' + && hdr->ar_name[3] == 'M' && hdr->ar_name[4] == '6' + && hdr->ar_name[5] == '4' && hdr->ar_name[6] == '/' + && hdr->ar_name[7] == ' ' + ) + { + // 64-bit symbol table. + pname->clear(); + } else if (hdr->ar_name[1] == '/') { // This is the extended name table. |