diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2018-01-29 20:58:23 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2018-01-29 20:58:23 +0000 |
commit | 74d82e6b688546121764363c154af4bfe2d480f1 (patch) | |
tree | cea9966958f939db1ea3448f9452e7a5c89bb6e4 | |
parent | dcbb27dd3f494812c89b530b7dcf06cfad2ff10b (diff) | |
download | gcc-74d82e6b688546121764363c154af4bfe2d480f1.zip gcc-74d82e6b688546121764363c154af4bfe2d480f1.tar.gz gcc-74d82e6b688546121764363c154af4bfe2d480f1.tar.bz2 |
compiler: don't insert write barriers if we've seen errors
The compiler skips the escape analysis pass if it has seen any errors.
The write barrier pass, especially the check-escapes portion, relies
on escape analysis running. So don't run this pass if there have been
any errors, as it may cause further unreliable error reports.
Reviewed-on: https://go-review.googlesource.com/90575
From-SVN: r257163
-rw-r--r-- | gcc/go/gofrontend/MERGE | 2 | ||||
-rw-r--r-- | gcc/go/gofrontend/wb.cc | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index d8350f3..dc53124 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -4164071703c531b5234b790b76df4931c37a8d9c +6517e6731aeb4512d12c341c7111959a44547ba0 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/wb.cc b/gcc/go/gofrontend/wb.cc index c550c52..094d8ec 100644 --- a/gcc/go/gofrontend/wb.cc +++ b/gcc/go/gofrontend/wb.cc @@ -410,6 +410,9 @@ Write_barriers::statement(Block* block, size_t* pindex, Statement* s) void Gogo::add_write_barriers() { + if (saw_errors()) + return; + Mark_address_taken mat(this); this->traverse(&mat); |