Matthew Dempsky | 0da4b2d | 2014-08-05 18:16:56 -0700 | [diff] [blame] | 1 | // Copyright 2014 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 | // Issue 8368 and 8441. Recursive struct definitions didn't work. |
| 6 | // No runtime test; just make sure it compiles. |
| 7 | |
| 8 | package cgotest |
| 9 | |
| 10 | /* |
| 11 | typedef struct one one; |
| 12 | typedef struct two two; |
| 13 | struct one { |
| 14 | two *x; |
| 15 | }; |
| 16 | struct two { |
| 17 | one *x; |
| 18 | }; |
| 19 | */ |
| 20 | import "C" |
| 21 | |
| 22 | func issue8368(one *C.struct_one, two *C.struct_two) { |
| 23 | } |
| 24 | |
| 25 | func issue8441(one *C.one, two *C.two) { |
| 26 | issue8441(two.x, one.x) |
| 27 | } |