G++ uses TREE_STATIC to mean "will be written out statically somewhere" rather than "write out statically in this TU"; it should be set on VAR_DECLs that also have DECL_EXTERNAL set.
Historically we've set DECL_EXTERNAL on anything that we weren't yet sure whether or not we were going to write out in the current TU in order to support assemble_external; now that we are always in unit-at-a-time mode that isn't necessary anymore, so we can do away with the DECL_NOT_REALLY_EXTERN trickery. -- Summary: G++ sets TREE_STATIC and DECL_EXTERNAL on the same VAR_DECLs Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jason at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39236