aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-data-ref.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2018-02-01 01:38:52 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2018-02-01 01:38:52 +0000
commit22149e37f7537843947003b4c7df76b69dd287ac (patch)
tree388a01b7e313a8a26c20afbf0aa8050f869359bb /gcc/tree-data-ref.c
parentee249a767f6d80ecc1037432ced41bba7e073268 (diff)
downloadgcc-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