aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2019-02-15 21:04:58 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2019-02-15 21:04:58 +0000
commitdd66d9d71d71c2b48c109fdd7908b754b7594677 (patch)
treec85466d08efb27deb508c18ae4db0846f88fd4da /gcc
parent879f9d0b2f80ed3ce4317709e0357ec6c3d36bc4 (diff)
downloadgcc-dd66d9d71d71c2b48c109fdd7908b754b7594677.zip
gcc-dd66d9d71d71c2b48c109fdd7908b754b7594677.tar.gz
gcc-dd66d9d71d71c2b48c109fdd7908b754b7594677.tar.bz2
re PR go/89368 (ICE in go/gofrontend/expressions.cc:4669 after r268923)
PR go/89368 compiler: write barrier check nil-check policy tweak Tweak the recipe for generating writeBarrier loads to insure that the dereference expr is marked as not requiring a nil check (not needed for gccgo, but needed for gollvm). Fixes https://gcc.gnu.org/PR89368 Reviewed-on: https://go-review.googlesource.com/c/162904 From-SVN: r268948
Diffstat (limited to 'gcc')
-rw-r--r--gcc/go/gofrontend/MERGE2
-rw-r--r--gcc/go/gofrontend/wb.cc3
2 files changed, 3 insertions, 2 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index 98325a9..4de68b6 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@
-0563f2d018cdb2cd685c254bac5ceb38396d0a27
+1a74b8a22b2ff7f430729aa87ecb8cea7b5cdd70
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 04619d3..1d12269 100644
--- a/gcc/go/gofrontend/wb.cc
+++ b/gcc/go/gofrontend/wb.cc
@@ -904,7 +904,8 @@ Gogo::check_write_barrier(Block* enclosing, Statement* without,
ref = Expression::make_unary(OPERATOR_AND, ref, loc);
ref = Expression::make_cast(unsafe_pointer_type, ref, loc);
ref = Expression::make_cast(puint32_type, ref, loc);
- ref = Expression::make_unary(OPERATOR_MULT, ref, loc);
+ ref = Expression::make_dereference(ref,
+ Expression::NIL_CHECK_NOT_NEEDED, loc);
Expression* zero = Expression::make_integer_ul(0, ref->type(), loc);
Expression* cond = Expression::make_binary(OPERATOR_EQEQ, ref, zero, loc);