Skip to content

go/types: doesn't understands constants defined in cgo code #21712

@purpleidea

Description

@purpleidea

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go version go1.9 linux/amd64

Does this issue reproduce with the latest release?

Yes, fails with git tip as well.

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"

GOBIN=""

GOEXE=""

GOHOSTARCH="amd64"

GOHOSTOS="linux"

GOOS="linux"

GOPATH="/home/travis/gopath"

GORACE=""

GOROOT="/home/travis/.gimme/versions/go1.9.linux.amd64"

GOTOOLDIR="/home/travis/.gimme/versions/go1.9.linux.amd64/pkg/tool/linux_amd64"

GCCGO="gccgo"

CC="gcc"

GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build036482233=/tmp/go-build -gno-record-gcc-switches"

CXX="g++"

CGO_ENABLED="1"

CGO_CFLAGS="-g -O2"

CGO_CPPFLAGS=""

CGO_CXXFLAGS="-g -O2"

CGO_FFLAGS="-g -O2"

CGO_LDFLAGS="-g -O2"

PKG_CONFIG="pkg-config"

What did you do?

100% reproducible. Travis link:

https://travis-ci.org/purpleidea/mgmt/jobs/270103895#L969

(errors are on the subsequent lines)

What did you expect to see?

No failures or a clear reason about what's wrong.

What did you see instead?

gotype fails where it didn't fail in golang 1.8
it would be great to report this as a false positive or to understand what changed between 1.8 and 1.9 that this is an issue.

Thanks!
James

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions