Skip to content
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

cmd/gc: Optimizer bug involving constants, bit shifts and []byte literals #5809

Closed
gopherbot opened this issue Jun 28, 2013 · 5 comments
Closed

Comments

@gopherbot
Copy link

by micah.stetson:

What steps will reproduce the problem?
Run this program in the playground: http://play.golang.org/p/cWZcknG23D

What is the expected output?
1234
234

What do you see instead?
1111
222

Which compiler are you using (5g, 6g, 8g, gccgo)?
6g

Which operating system are you using?
Mac OS X 10.7.5 and also the Go Playground

Which version are you using?  (run 'go version')
Tried with go 1.1 and go 1.1.1

Please provide any additional information below.

Disabling optimization with go build -gcflags -N makes the problem go away. So do any
number of source-level changes.
@ianlancetaylor
Copy link
Contributor

Comment 1:

Labels changed: added priority-soon, go1.1.2, removed priority-triage.

@ianlancetaylor
Copy link
Contributor

Comment 2:

Labels changed: added compilerbug.

@DanielMorsing
Copy link
Contributor

Comment 3:

Fix at https://golang.org/cl/10785043

Owner changed to @DanielMorsing.

Status changed to Started.

@DanielMorsing
Copy link
Contributor

Comment 4:

This issue was closed by revision 3c3ce8e.

Status changed to Fixed.

@adg
Copy link
Contributor

adg commented Jul 22, 2013

Comment 5:

This issue was closed by revision 3f654997fdd6.

@rsc rsc added this to the Go1.1.2 milestone Apr 14, 2015
@rsc rsc removed the go1.1.2 label Apr 14, 2015
adg added a commit that referenced this issue May 11, 2015
…f non-constant LEA.

««« CL 10785043 / cf792c00f410
cmd/6g, cmd/8g: prevent constant propagation of non-constant LEA.

Fixes #5809.

R=golang-dev, dave, rsc, nigeltao
CC=golang-dev
https://golang.org/cl/10785043
»»»

Update #5928

R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/11515045
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
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

5 participants