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: add test checking for correct NOP insertion #7889

Closed
josharian opened this issue Apr 28, 2014 · 2 comments
Closed

cmd/compile: add test checking for correct NOP insertion #7889

josharian opened this issue Apr 28, 2014 · 2 comments

Comments

@josharian
Copy link
Contributor

NOPs mark variables as used. However, if you eliminate all NOPs before that information
is actually used (e.g. CL 98810043), all.bash still passes.

We should add a functional test -- i.e. a legal Go program -- that fails if NOPs are not
correctly inserted.

I'm unsure how to go about constructing such a test. (Seems like it would likely involve
CGo or reflect?) Tips/hints welcomed.
@rsc
Copy link
Contributor

rsc commented May 2, 2014

Comment 1:

This is fine but low priority. I don't think it needs to be targeted to a release. The
NOP semantics are there for the benefit of the code generator. If the code generator
doesn't use them right now, fine.

Labels changed: added release-none, removed release-go1.4.

Status changed to Accepted.

@griesemer
Copy link
Contributor

Comment 2:

Labels changed: added repo-main.

@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@rsc rsc changed the title cmd/gc: add test checking for correct NOP insertion cmd/compile: add test checking for correct NOP insertion Jun 8, 2015
@golang golang locked and limited conversation to collaborators Jun 26, 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

4 participants