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/compile/internal/amd64: Duplicate if statement branches #6864

Closed
gopherbot opened this issue Dec 2, 2013 · 12 comments
Closed

cmd/compile/internal/amd64: Duplicate if statement branches #6864

gopherbot opened this issue Dec 2, 2013 · 12 comments

Comments

@gopherbot
Copy link

by mathew1800:

See: https://code.google.com/p/go/source/browse/src/cmd/6g/gsubr.c#2163

There is the following:

if(o & OAddable) {
    naddr(reg1, a, 1);
    a->offset = 0;
    a->scale = w;
    a->index = a->type;
    a->type = reg->val.u.reg + D_INDIR;
} else {
    naddr(reg1, a, 1);
    a->offset = 0;
    a->scale = w;
    a->index = a->type;
    a->type = reg->val.u.reg + D_INDIR;
}

This was likely a copy/paste error or something.
@dsymonds
Copy link
Contributor

dsymonds commented Dec 2, 2013

Comment 1:

https://golang.org/cl/35780043/

Labels changed: added priority-later, norelease, size-s, removed priority-triage, go1.3maybe.

Status changed to Started.

@rsc
Copy link
Contributor

rsc commented Dec 2, 2013

Comment 2:

Labels changed: added go1.3, removed norelease.

@minux
Copy link
Member

minux commented Dec 2, 2013

Comment 3:

out of curiosity, i did some simple experiments with this.
the code could be traced back to 2010:
https://golang.org/cl/1942043/diff/2001/src/cmd/6g/gsubr.c#new-line-1935
and no changes ever since.
also, all.bash could pass without the true (then) branch of the if which suggests that
either we have incomplete test coverage, or there are more deadcode involving
o & OAddable.

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 4:

Labels changed: added release-go1.3.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 5:

Labels changed: removed go1.3.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 6:

Labels changed: added repo-main.

@gopherbot
Copy link
Author

Comment 7:

CL https://golang.org/cl/35780043 references this issue.

@gopherbot
Copy link
Author

Comment 8:

CL https://golang.org/cl/35780043 references this issue.

@rsc
Copy link
Contributor

rsc commented Apr 14, 2014

Comment 9:

Labels changed: added release-go1.3maybe, removed release-go1.3.

@rsc
Copy link
Contributor

rsc commented May 9, 2014

Comment 10:

Labels changed: added release-none, removed release-go1.3maybe.

@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@rsc rsc changed the title cmd/6g: Duplicate if statement branches cmd/compile/internal/amd64: Duplicate if statement branches Jun 8, 2015
@odeke-em
Copy link
Member

Is this issue still relevant since we phased out the C compiler?

@randall77
Copy link
Contributor

I think this has been long irrelevant. I can't even find this code any more. Closing.

@golang golang locked and limited conversation to collaborators Jul 25, 2017
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

6 participants