Skip to content

gccgo-go vs. go discrepancy for eval order #24317

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ratnikov opened this issue Mar 9, 2018 · 1 comment
Closed

gccgo-go vs. go discrepancy for eval order #24317

ratnikov opened this issue Mar 9, 2018 · 1 comment
Milestone

Comments

@ratnikov
Copy link

ratnikov commented Mar 9, 2018

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

$ gccgo-go version
go version xgcc (Ubuntu 4.9.3-0ubuntu4) 4.9.3 linux/amd64

Does this issue reproduce with the latest release?

It works with non-gcc go.

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

$ gccgo-go env
GOARCH="amd64"
GOBIN=""
GOCHAR="6"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH=""
GORACE=""
GOROOT="/usr"
GOTOOLDIR="/usr/lib/gccgo/tool"
TERM="dumb"
CC="gcc"
GOGCCFLAGS="-g -O2 -fPIC -m64 -pthread"
CXX="g++"
CGO_ENABLED="1"

What did you do?

https://play.golang.org/p/V4-aR5AR5N7

It works on playground, but with gccgo-go it errors out:
$ gccgo-go run repro.go
2018/03/08 19:56:50 Wrong value returned: []
exit status 1

What did you expect to see?

All good!

What did you see instead?

Wrong value returned: []

@gopherbot gopherbot added this to the Gccgo milestone Mar 9, 2018
@randall77
Copy link
Contributor

This is probably a duplicate of #23188 .
We should consider all these order-of-evaluation issues together.
I'll close this, and if it doesn't get solved as part of the solution for #23188 we can reopen.

@golang golang locked and limited conversation to collaborators Mar 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants