diff options
author | Jan Hubicka <jh@suse.cz> | 2010-09-03 11:58:21 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2010-09-03 09:58:21 +0000 |
commit | a482b1f5f45fbd54fce4098d4e03958d1457a310 (patch) | |
tree | 1a0056a61f675aa9f60f5f9ea43861c09f244e5f /gcc/passes.c | |
parent | 2f757e4a8b6357445614fe51c4ff394fb13be173 (diff) | |
download | gcc-a482b1f5f45fbd54fce4098d4e03958d1457a310.tar.gz |
passes.c (rest_of_decl_compilation): Do not add local vars into varpol.
* passes.c (rest_of_decl_compilation): Do not add local vars into varpol.
* varpool.c (varpool_get_node, varpool_node): Sanity check that only
static or extern vars are in varpool.
(varpool_finalize_decl): Sanity check that only static vars are finalized.
From-SVN: r163804
Diffstat (limited to 'gcc/passes.c')
-rw-r--r-- | gcc/passes.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/passes.c b/gcc/passes.c index 4823c6397c2..88da9b35632 100644 --- a/gcc/passes.c +++ b/gcc/passes.c @@ -219,7 +219,8 @@ rest_of_decl_compilation (tree decl, /* Let cgraph know about the existence of variables. */ if (in_lto_p && !at_end) ; - else if (TREE_CODE (decl) == VAR_DECL && !DECL_EXTERNAL (decl)) + else if (TREE_CODE (decl) == VAR_DECL && !DECL_EXTERNAL (decl) + && TREE_STATIC (decl)) varpool_node (decl); } |