github.com/xushiwei/go@v0.0.0-20130601165731-2b9d83f45bc9/test/fixedbugs/issue4964.dir/a.go (about)

     1  // Copyright 2013 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 a
     6  
     7  var global, global2 *int
     8  
     9  type T struct {
    10  	Pointer *int
    11  }
    12  
    13  func dontinline() {}
    14  
    15  func Store(t *T) {
    16  	global = t.Pointer
    17  	dontinline()
    18  }
    19  
    20  func Store2(t *T) {
    21  	global2 = t.Pointer
    22  	dontinline()
    23  }
    24  
    25  func Get() *int {
    26  	return global
    27  }