diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2018-02-01 01:38:52 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2018-02-01 01:38:52 +0000 |
commit | 22149e37f7537843947003b4c7df76b69dd287ac (patch) | |
tree | 388a01b7e313a8a26c20afbf0aa8050f869359bb /gcc/tree-data-ref.c | |
parent | ee249a767f6d80ecc1037432ced41bba7e073268 (diff) | |
download | gcc-22149e37f7537843947003b4c7df76b69dd287ac.zip gcc-22149e37f7537843947003b4c7df76b69dd287ac.tar.gz gcc-22149e37f7537843947003b4c7df76b69dd287ac.tar.bz2 |
compiler: check for nil receiver in value method
We already dereference the pointer to copy the value, but if the
method does not use the value then the pointer dereference may be
optimized away. Do an explicit nil check so that we get the panic
that is required.
Fixes golang/go#19806
Reviewed-on: https://go-review.googlesource.com/91275
* go.go-torture/execute/printnil.go: New test.
From-SVN: r257280
Diffstat (limited to 'gcc/tree-data-ref.c')
0 files changed, 0 insertions, 0 deletions