diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2017-01-11 17:41:49 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2017-01-11 17:41:49 +0000 |
commit | 25e15acf8cf0b7dc54367cb491c5f2d772199efb (patch) | |
tree | ed212265fa0780da97cfbad866130dd3b5343609 /gcc/go/gofrontend/runtime.cc | |
parent | bf5fbf465dee3a30588bc9e6895d50a6f4ca59c5 (diff) | |
download | gcc-25e15acf8cf0b7dc54367cb491c5f2d772199efb.zip gcc-25e15acf8cf0b7dc54367cb491c5f2d772199efb.tar.gz gcc-25e15acf8cf0b7dc54367cb491c5f2d772199efb.tar.bz2 |
compiler: mark generated struct/array types as incomparable
The recent change to generate type functions for more types with
identity comparisons caused us to generate some unnecessary functions,
and even caused a compiler crash on Solaris due to phase ordering.
Avoid this by marking all generated and uncompared struct and array
types as incomparable, so that we don't try to generate type functions
for them.
Reviewed-on: https://go-review.googlesource.com/35110
From-SVN: r244327
Diffstat (limited to 'gcc/go/gofrontend/runtime.cc')
-rw-r--r-- | gcc/go/gofrontend/runtime.cc | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/gcc/go/gofrontend/runtime.cc b/gcc/go/gofrontend/runtime.cc index 77c48ec..a921449 100644 --- a/gcc/go/gofrontend/runtime.cc +++ b/gcc/go/gofrontend/runtime.cc @@ -190,27 +190,47 @@ runtime_function_type(Runtime_function_type bft) break; case RFT_ARRAY2STRING: - t = Type::make_array_type(Type::make_string_type(), + { + Array_type* at = + Type::make_array_type(Type::make_string_type(), Expression::make_integer_ul(2, NULL, bloc)); + at->set_is_array_incomparable(); + t = at; + } break; case RFT_ARRAY3STRING: - t = Type::make_array_type(Type::make_string_type(), + { + Array_type* at = + Type::make_array_type(Type::make_string_type(), Expression::make_integer_ul(3, NULL, bloc)); + at->set_is_array_incomparable(); + t = at; + } break; case RFT_ARRAY4STRING: - t = Type::make_array_type(Type::make_string_type(), + { + Array_type* at = + Type::make_array_type(Type::make_string_type(), Expression::make_integer_ul(4, NULL, bloc)); + at->set_is_array_incomparable(); + t = at; + } break; case RFT_ARRAY5STRING: - t = Type::make_array_type(Type::make_string_type(), + { + Array_type* at = + Type::make_array_type(Type::make_string_type(), Expression::make_integer_ul(5, NULL, bloc)); + at->set_is_array_incomparable(); + t = at; + } break; } |