http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47260
--- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-01-12 13:37:53 UTC --- Kai sent a draft patch. The issue is that TREE_PUBLIC/TREE_EXTERNAL should come before setting the attribute - otherwise the decl seems to be inconsistent. I try to submit the patch soon. (If not, please ping.)