Don't crash on Sizeof of undefined type.
authorIan Lance Taylor <ian@gcc.gnu.org>
Thu, 16 Dec 2010 00:02:33 +0000 (00:02 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Thu, 16 Dec 2010 00:02:33 +0000 (00:02 +0000)
From-SVN: r167884

gcc/go/gofrontend/expressions.cc

index 4f6e4ed3622969237b9ba4917a91c32bae38b9c1..39bbc84512aa45416bec7524a263c6c34768a5cb 100644 (file)
@@ -7069,7 +7069,8 @@ Builtin_call_expression::check_one_arg()
       return false;
     }
   if (args->front()->is_error_expression()
-      || args->front()->type()->is_error_type())
+      || args->front()->type()->is_error_type()
+      || args->front()->type()->is_undefined())
     {
       this->set_is_error();
       return false;