toplev.c (wrapup_global_declarations): Don't write out artificial static variables that aren't needed.
* toplev.c (wrapup_global_declarations): Don't write out artificial static variables that aren't needed. * decl.c (wrapup_globals_for_namespace): Don't mark things TREE_ASM_WRITTEN when they're not. From-SVN: r37485
This commit is contained in:
parent
adcee32ccb
commit
6213608449
|
@ -1,3 +1,8 @@
|
|||
2000-11-15 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
* toplev.c (wrapup_global_declarations): Don't write out
|
||||
artificial static variables that aren't needed.
|
||||
|
||||
2000-11-15 Bernd Schmidt <bernds@redhat.co.uk>
|
||||
|
||||
* ia64.c (struct group): New structure.
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2000-11-15 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
* decl.c (wrapup_globals_for_namespace): Don't mark things
|
||||
TREE_ASM_WRITTEN when they're not.
|
||||
|
||||
2000-11-15 Jason Merrill <jason@redhat.com>
|
||||
|
||||
* typeck2.c (friendly_abort): Uncount the error before handing
|
||||
|
|
|
@ -1926,20 +1926,8 @@ wrapup_globals_for_namespace (namespace, data)
|
|||
|
||||
/* Process the decls in reverse order--earliest first.
|
||||
Put them into VEC from back to front, then take out from front. */
|
||||
|
||||
for (i = 0, decl = globals; i < len; i++, decl = TREE_CHAIN (decl))
|
||||
{
|
||||
/* Pretend we've output an unused static variable. This ensures
|
||||
that the toplevel __FUNCTION__ etc won't be emitted, unless
|
||||
needed. */
|
||||
if (TREE_CODE (decl) == VAR_DECL && DECL_ARTIFICIAL (decl)
|
||||
&& !TREE_PUBLIC (decl) && !TREE_USED (decl))
|
||||
{
|
||||
TREE_ASM_WRITTEN (decl) = 1;
|
||||
DECL_IGNORED_P (decl) = 1;
|
||||
}
|
||||
vec[len - i - 1] = decl;
|
||||
}
|
||||
vec[len - i - 1] = decl;
|
||||
|
||||
if (last_time)
|
||||
{
|
||||
|
|
|
@ -1950,7 +1950,9 @@ wrapup_global_declarations (vec, len)
|
|||
if (TREE_CODE (decl) == VAR_DECL && TREE_STATIC (decl)
|
||||
&& (! TREE_READONLY (decl)
|
||||
|| TREE_PUBLIC (decl)
|
||||
|| (!optimize && flag_keep_static_consts)
|
||||
|| (!optimize
|
||||
&& flag_keep_static_consts
|
||||
&& !DECL_ARTIFICIAL (decl))
|
||||
|| TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl))))
|
||||
{
|
||||
reconsider = 1;
|
||||
|
|
Loading…
Reference in New Issue