------- Comment #4 from rguenth at gcc dot gnu dot org 2010-08-11 10:59 ------- Well. I do not have access to i686-pc-mingw32-gcc and this seems related to
/* Return whether OP is a DECL whose address is function-invariant. */ bool decl_address_invariant_p (const_tree op) { /* The conditions below are slightly less strict than the one in staticp. */ ... case VAR_DECL: if (((TREE_STATIC (op) || DECL_EXTERNAL (op)) && !DECL_DLLIMPORT_P (op)) || DECL_THREAD_LOCAL_P (op) || DECL_CONTEXT (op) == current_function_decl || decl_function_context (op) == current_function_decl) return true; break; WTF !DECL_DLLIMPORT_P (op)!? (also noticed by rth recently) A fix is to remove that check here, but I can't test that. -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |4.6.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45255