diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-07-31 23:17:49 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-07-31 23:17:49 +0000 |
commit | 5f1045b58d0a4291a2ae65da36ec0f45ad45ed67 (patch) | |
tree | 5ebe29b68c0615d915eaa32dceaac54475d501a6 /gcc/go | |
parent | 4d513164cfb153ce788296ddff1bc14e8688a680 (diff) | |
download | gcc-5f1045b58d0a4291a2ae65da36ec0f45ad45ed67.tar.gz |
compiler: Report errors for malformed builtin calls.
Errors reported from malformed builtin calls are handled in a later
pass than the one in which they are detected. If a malformed builtin
call is lowered into an error expression too early, these errors will
never be reported.
Fixes golang/go#11561.
Reviewed-on: https://go-review.googlesource.com/12778
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@226459 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/go')
-rw-r--r-- | gcc/go/gofrontend/MERGE | 2 | ||||
-rw-r--r-- | gcc/go/gofrontend/expressions.cc | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 732b33d36a0..4ebc803a915 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -bc4dda16f8686ab6e7335adfdfd2c6cc81cb2eb5 +2bf7c643a1d2f8503070c8e6cb87852026e32400 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc index 065be33a967..976e34b3688 100644 --- a/gcc/go/gofrontend/expressions.cc +++ b/gcc/go/gofrontend/expressions.cc @@ -8499,7 +8499,8 @@ Call_expression::do_lower(Gogo* gogo, Named_object* function, { if (!this->fn_->type()->is_error()) this->report_error(_("expected function")); - return Expression::make_error(loc); + this->set_is_error(); + return this; } // Handle an argument which is a call to a function which returns |