http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47260
Tobias Burnus <burnus at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rejects-valid Summary|DLLEXPORT attribute |DLLEXPORT: TREE_PUBLIC for |requires additional |procedures lost between |capabilities to be useful |trans-decl.c and tree.c --- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-01-12 10:17:55 UTC --- Confirmed. On Linux (should be also in Windows), the TREE_PUBLIC in build_function_decl is set. On the other hand, Kai confirmed that in MinGW64 the same error occurs. It seems as if the TREE_PUBLIC is lost in between (the error message is printed in tree.c's handle_dll_attribute). Fails also with: gcc version 4.5.3 20110103 (prerelease) (GCC) thus it is not a regression (Obtainted from: http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Automated%20Builds/ ; the "1.0" builds are for GCC 4.5.) Thus, it does not seem to be an LTO problem or an -fwhole-file issue.