You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you, @cuonglm, I submitted a PR. I'm not even close to be a compiler expert, but intuitively it looks strange that this case works with more aggressive optimization (O1, O2) and breaks with minimal optimization (O0). I'm not arguing with the fact that it may indeed be an expected behavior, just pointing out that it feels misleading to me.
Coming from this issue: go-delve/delve#2187
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
I'd expect it to build with
CGO_CFLAGS='-O0 -g'
because these are the flags that GoLand uses when running a program in a debugger (compiling first).What did you see instead?
Link (ld) error.
gcc versions
I tried two versions with the same result:
The text was updated successfully, but these errors were encountered: