github.com/mdempsky/go@v0.0.0-20151201204031-5dd372bd1e70/src/runtime/race/testdata/issue12225_test.go (about)

     1  // Copyright 2015 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package race_test
     6  
     7  // golang.org/issue/12225
     8  // The test is that this compiles at all.
     9  
    10  func issue12225() {
    11  	println(*(*int)(unsafe.Pointer(&convert("")[0])))
    12  	println(*(*int)(unsafe.Pointer(&[]byte("")[0])))
    13  }