summaryrefslogtreecommitdiffstats
path: root/gcc/cfgexpand.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2006-10-18 21:39:52 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2006-10-18 21:39:52 +0000
commit9aba3cd46009060bae6749ee0b43c9adced5a61c (patch)
tree975208f2a044fb57876ad485ab26298b6cff747d /gcc/cfgexpand.c
parent7242b78aa9ff6e99b670dffec5381bebffb452df (diff)
downloadppe42-gcc-9aba3cd46009060bae6749ee0b43c9adced5a61c.tar.gz
ppe42-gcc-9aba3cd46009060bae6749ee0b43c9adced5a61c.zip
PR middle-end/29299
* cfgexpand.c (expand_used_vars_for_block): Vars marked used by user are used. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117863 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r--gcc/cfgexpand.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index 4cc1047fadf..b688917cc72 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -764,7 +764,12 @@ expand_used_vars_for_block (tree block, bool toplevel)
/* Expand all variables at this level. */
for (t = BLOCK_VARS (block); t ; t = TREE_CHAIN (t))
- if (TREE_USED (t))
+ if (TREE_USED (t)
+ /* Force local static variables to be output when marked by
+ used attribute. For unit-at-a-time, cgraph code already takes
+ care of this. */
+ || (!flag_unit_at_a_time && TREE_STATIC (t)
+ && DECL_PRESERVE_P (t)))
expand_one_var (t, toplevel);
this_sv_num = stack_vars_num;
OpenPOWER on IntegriCloud