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: -l
does not disable intra-package inlining
#44585
Comments
cc @mdempsky |
On the noopt builder, package math will have been compiled with I'm a little less sure why the local function would fix it. Maybe because test/run.go doesn't pass GO_GCFLAGS through to the compiler when invoked for errorcheck tests? I seem to remember some inconsistency like that. And if package A imports package B, and B was compiled with |
I was looking into test/run.go and it does have some special behavior for noopt. Line 396 in 37ca84a
And some of the tests are disabled with those flags Line 1 in 37ca84a
But, the code looks like it does pass the gc flags: Line 1113 in 37ca84a
|
test/inline.go is an "errorcheck" test case. That last link (line 1113) is for "run" test cases.
|
Hmm, so it does look like the code does what it is written to do :D. And the explanation that math was compiled with I don't really have anything actionable that could be done here, since the tooling seems to work as intended. |
Thanks for investigating. This makes sense now; or anyway, I understand now. :) |
-l
seems to have different behavior depending on whether the func is imported from another package or not. This came up in this changeset: https://go-review.googlesource.com/c/go/+/295989.Test with
-N -l
failed with this version of the code:It's weird that
-l
only disables some of the inlining.The text was updated successfully, but these errors were encountered: