r249562 - in /trunk: gcc/go/gofrontend/MERGE li...
ian@gcc.gnu.org
ian@gcc.gnu.org
Thu Jun 22 14:46:00 GMT 2017
Author: ian
Date: Thu Jun 22 14:46:12 2017
New Revision: 249562
URL: https://gcc.gnu.org/viewcvs?rev=249562&root=gcc&view=rev
Log:
runtime: don't assume that _ = *s will panic if s is nil
With the gc toolchain apparently
var s *string
_ = *s
is enough to panic with a nil pointer dereference. The gccgo compiler
will simply discard the dereference, which I think is a reasonable and
acceptable optimization. Change the tests to use an exported variable
instead. The tests are not currently run, but they will be with a
later patch to gotools.
Reviewed-on: https://go-review.googlesource.com/46450
Modified:
trunk/gcc/go/gofrontend/MERGE
trunk/libgo/go/runtime/testdata/testprog/crash.go
trunk/libgo/go/runtime/testdata/testprogcgo/crash.go
More information about the Gcc-cvs
mailing list