github.com/huandu/go@v0.0.0-20151114150818-04e615e41150/misc/cgo/test/issue6472.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 cgotest
     6  
     7  /*
     8  typedef struct
     9  {
    10          struct
    11          {
    12              int x;
    13          } y[16];
    14  } z;
    15  */
    16  import "C"
    17  
    18  func test6472() {
    19  	// nothing to run, just make sure this compiles
    20  	s := new(C.z)
    21  	println(s.y[0].x)
    22  }