From: Ian Lance Taylor Date: Thu, 19 Sep 2013 17:32:56 +0000 (+0000) Subject: compiler: Fix inconsistent check for structs using memcmp for ==. X-Git-Tag: releases/gcc-4.9.0~3965 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e8c24600cc68e3aa323efd56473b38a329801b72;p=thirdparty%2Fgcc.git compiler: Fix inconsistent check for structs using memcmp for ==. Test is bug479. From-SVN: r202751 --- diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc index 0b0103342294..99edb4b80312 100644 --- a/gcc/go/gofrontend/expressions.cc +++ b/gcc/go/gofrontend/expressions.cc @@ -7752,8 +7752,6 @@ Builtin_call_expression::do_numeric_constant_value(Numeric_constant* nc) const return false; if (arg_type->is_abstract()) return false; - if (arg_type->named_type() != NULL) - arg_type->named_type()->convert(this->gogo_); unsigned int ret; if (this->code_ == BUILTIN_SIZEOF) diff --git a/gcc/go/gofrontend/types.cc b/gcc/go/gofrontend/types.cc index 0e8f479db706..32f827dd316a 100644 --- a/gcc/go/gofrontend/types.cc +++ b/gcc/go/gofrontend/types.cc @@ -2288,9 +2288,7 @@ Type::is_backend_type_size_known(Gogo* gogo) } case TYPE_NAMED: - // Begin converting this type to the backend representation. - // This will create a placeholder if necessary. - this->get_backend(gogo); + this->named_type()->convert(gogo); return this->named_type()->is_named_backend_type_size_known(); case TYPE_FORWARD: