comparison libgo/misc/cgo/test/issue7234_test.go @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
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 package cgotest
6
7 import "testing"
8
9 // This test actually doesn't have anything to do with cgo. It is a
10 // test of https://golang.org/issue/7234, a compiler/linker bug in
11 // handling string constants when using -linkmode=external. The test
12 // is in this directory because we routinely test -linkmode=external
13 // here.
14
15 var v7234 = [...]string{"runtime/cgo"}
16
17 func Test7234(t *testing.T) {
18 if v7234[0] != "runtime/cgo" {
19 t.Errorf("bad string constant %q", v7234[0])
20 }
21 }