------- Comment #17 from dannysmith at users dot sourceforge dot net 2010-05-18 22:43 ------- (In reply to comment #14) > Index: gcc/gcc/varasm.c > =================================================================== > --- gcc.orig/gcc/varasm.c 2010-05-18 13:19:20.000000000 +0200 > +++ gcc/gcc/varasm.c 2010-05-18 17:10:11.385445300 +0200 > @@ -403,6 +403,8 @@ emutls_decl (tree decl) > int foo() { return i; } > __thread int i = 1; > in which I goes from external to locally defined and initialized. */ > + DECL_DLLIMPORT_P (to) = DECL_DLLIMPORT_P (decl); > + DECL_ATTRIBUTES (to) = targetm.merge_decl_attributes (decl, to); > > TREE_STATIC (to) = TREE_STATIC (decl); > TREE_USED (to) = TREE_USED (decl); >
I like this approach better too. It would be even cleaner (here and elswhere) if we had a decl_with_vis.dllexport_flag and DECL_DLLEXPORT_P. 14 spare bits left in decl_with_vis. Are they too precious?? Danny -- dannysmith at users dot sourceforge dot net changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dannysmith at users dot | |sourceforge dot net http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44139