-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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/cgo: structure used when calling Go function from C is not properly packed on 32-bit Windows with recent GCC #6833
Labels
Comments
I don't see your problem here on windows/386: C:\go\path\src\issue6833>go build && issue6833.exe expected : 4000300020001007 got : 4000300020001007 C:\go\path\src\issue6833>gcc --version gcc (tdm-1) 4.5.2 Copyright (C) 2010 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Alex |
Sorry for too concise report. Problem shows up starting from gcc 4.7, see issue #5603. |
I can reproduce this bug using the following: OS: Windows 8 64-bit on Intel Core i7 Go: go1.2rc5 windows/386 gcc: gcc (tdm-2) 4.8.1 The output I get on windows/386 is: expected : 4000300020001007 got : a000920001000 I installed TDM-GCC (32-bit) from the individual .lzma files at http://tdm-gcc.tdragon.net/download I'll help test patches if they become available. |
Yes it is broken with gcc-4.8.1: C:\go\path\src\issue6833>go build && issue6833.exe expected : 4000300020001007 got : 12feec20001000 C:\go\path\src\issue6833>gcc --version gcc (tdm-2) 4.8.1 Copyright (C) 2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. But I have no idea how to fix it. Alex |
0x6a67, like https://golang.org/cl/35790045 ? Alex Status changed to Started. |
This issue was closed by revision 6795687. Status changed to Fixed. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
by 0x6a67:
The text was updated successfully, but these errors were encountered: