1
0
mirror of https://github.com/golang/go synced 2024-11-12 12:30:21 -07:00
go/misc/cgo/test/issue4054b.go
Joel Sing 9536480edc cgo: process DWARF info even when debug data is used for value
Always process the DWARF info, even when the const value is determined
using the debug data block. This ensures that the injected enum is
removed and future loads of the same constant do not trigger
inconsistent definitions.

Add tests for issues 2470 and 4054.
Fixes #4054.

R=golang-dev, fullung, dave, rsc, minux.ma
CC=golang-dev
https://golang.org/cl/6501101
2012-09-20 13:20:33 +10:00

24 lines
341 B
Go

// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package cgotest
/*
typedef enum {
A = 0,
B,
C,
D,
E,
F,
G,
H,
I,
J,
} issue4054b;
*/
import "C"
var issue4054b = []int{C.A, C.B, C.C, C.D, C.E, C.F, C.G, C.H, C.I, C.J}