[Bug go/65134] gccgo ignores the attribute "constructor" in a subdirectory

2016-02-10 Thread ian at airs dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65134 Ian Lance Taylor changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug go/65134] gccgo ignores the attribute constructor in a subdirectory

2015-02-24 Thread boger at us dot ibm.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65134 --- Comment #5 from boger at us dot ibm.com --- (In reply to Tatsushi Inagaki from comment #0) Created attachment 34813 [details] Example to reproduce the constructor problem Gccgo ignores a C-function with the constructor attribute in a

[Bug go/65134] gccgo ignores the attribute constructor in a subdirectory

2015-02-24 Thread ian at airs dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65134 --- Comment #6 from Ian Lance Taylor ian at airs dot com --- No, I believe the problem is different. The gccgo build process stores objects in an archive, and relies on the system linker to pull in those objects. However, at least on ELF-based

[Bug go/65134] gccgo ignores the attribute constructor in a subdirectory

2015-02-20 Thread ian at airs dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65134 --- Comment #1 from Ian Lance Taylor ian at airs dot com --- It's pretty ugly, but a workaround is to drop something like this into sub.go: var AlwaysFalse bool func init() { if AlwaysFalse { C.init() } } The idea is to force in

[Bug go/65134] gccgo ignores the attribute constructor in a subdirectory

2015-02-20 Thread e29253 at jp dot ibm.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65134 --- Comment #2 from Tatsushi Inagaki e29253 at jp dot ibm.com --- (In reply to Ian Lance Taylor from comment #1) It's pretty ugly, but a workaround is to drop something like this into sub.go: var AlwaysFalse bool func init() { if

[Bug go/65134] gccgo ignores the attribute constructor in a subdirectory

2015-02-20 Thread ian at airs dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65134 --- Comment #3 from Ian Lance Taylor ian at airs dot com --- In principle, sure. In practice, since it's an exported variable, the compiler would have to see the entire program, which can't happen at present. If it ever can, then something else

[Bug go/65134] gccgo ignores the attribute constructor in a subdirectory

2015-02-20 Thread e29253 at jp dot ibm.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65134 --- Comment #4 from Tatsushi Inagaki e29253 at jp dot ibm.com --- I see. Thanks a lot!