aboutsummaryrefslogtreecommitdiff
path: root/gcc/go
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2015-03-31 00:10:46 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2015-03-31 00:10:46 +0000
commita7b09e17ad860f7a5632c73ebea28dd62c33a901 (patch)
tree07d6b2ced3888ceb58be1736f9d1c90f5cbb7abe /gcc/go
parent00a0ea64eec42da418a111bb4585b2ea007358dc (diff)
downloadgcc-a7b09e17ad860f7a5632c73ebea28dd62c33a901.zip
gcc-a7b09e17ad860f7a5632c73ebea28dd62c33a901.tar.gz
gcc-a7b09e17ad860f7a5632c73ebea28dd62c33a901.tar.bz2
compiler: Mark builtin calls with bad types as errors.
Fixes golang/go/#10285. From-SVN: r221782
Diffstat (limited to 'gcc/go')
-rw-r--r--gcc/go/gofrontend/expressions.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc
index 0cb0938..40d9aa7 100644
--- a/gcc/go/gofrontend/expressions.cc
+++ b/gcc/go/gofrontend/expressions.cc
@@ -7959,7 +7959,10 @@ Builtin_call_expression::do_check_types(Gogo*)
Type* arg1_type = args->front()->type();
Type* arg2_type = args->back()->type();
if (arg1_type->is_error() || arg2_type->is_error())
- break;
+ {
+ this->set_is_error();
+ break;
+ }
Type* e1;
if (arg1_type->is_slice_type())
@@ -8001,7 +8004,10 @@ Builtin_call_expression::do_check_types(Gogo*)
}
if (args->front()->type()->is_error()
|| args->back()->type()->is_error())
- break;
+ {
+ this->set_is_error();
+ break;
+ }
Array_type* at = args->front()->type()->array_type();
Type* e = at->element_type();