------- Additional Comments From dannysmith at users dot sourceforge dot net 2005-05-12 10:14 ------- (In reply to comment #4) The patch for 21275 failed to take care of C++ class members which "inherit" a dllimport attribute from the class type definition.
Here is a C++ testcase: struct __attribute__ ((dllimport)) Foo { static int bar (void); }; typedef int(*foobar)(void); foobar my_foobar = (foobar) &Foo::bar; int my_bar() { return my_foobar(); } The code that marks Foo::bar as NON_ADDR_CONSTANT_P in winnt.c happens too late. I have a more invasive patch that fixes C and C++, replacing NON_ADDR_CONST_P with a target hook (dll-supporting targets are currently the only ones that set the tree_decl.non_addr_const_p flag). I'll submit as soon as I can access a machine that will build and regtest Java on mingw. Danny -- What |Removed |Added ---------------------------------------------------------------------------- CC| |dannysmith at users dot | |sourceforge dot net http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21447