From: Ian Lance Taylor Date: Wed, 15 Dec 2010 23:56:51 +0000 (+0000) Subject: Don't crash on Sizeof of undefined type. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=70749e9cbed9302e59f6e7efc525f79c6b52d75e;p=gcc.git Don't crash on Sizeof of undefined type. From-SVN: r167883 --- diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc index 844ff660a24..4f6e4ed3622 100644 --- a/gcc/go/gofrontend/expressions.cc +++ b/gcc/go/gofrontend/expressions.cc @@ -6722,7 +6722,7 @@ Builtin_call_expression::do_integer_constant_value(bool iota_is_constant, if (arg == NULL) return false; Type* arg_type = arg->type(); - if (arg_type->is_error_type()) + if (arg_type->is_error_type() || arg_type->is_undefined()) return false; if (arg_type->is_abstract()) return false;