Mercurial > hg > CbC > CbC_gcc
annotate libgo/misc/cgo/test/duplicate_symbol.go @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
rev | line source |
---|---|
111 | 1 // Copyright 2010 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 // This file contains test cases for cgo. | |
6 | |
7 package cgotest | |
8 | |
9 /* | |
10 int base_symbol = 0; | |
11 | |
12 #define alias_one base_symbol | |
13 #define alias_two base_symbol | |
14 */ | |
15 import "C" | |
16 | |
17 import "fmt" | |
18 | |
19 func duplicateSymbols() { | |
20 fmt.Printf("%v %v %v\n", C.base_symbol, C.alias_one, C.alias_two) | |
21 } |