aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfgexpand.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2010-02-23 13:32:09 -0500
committerJason Merrill <jason@gcc.gnu.org>2010-02-23 13:32:09 -0500
commit3adcf52c820f3a0bab965fd40c4713fbc220cbaa (patch)
tree0cff02b0c33cf25a24f5ba9e768b3b1e81863f56 /gcc/cfgexpand.c
parenta3b20e90b15f4022bbc6851b11e1950b89c3b961 (diff)
downloadgcc-3adcf52c820f3a0bab965fd40c4713fbc220cbaa.zip
gcc-3adcf52c820f3a0bab965fd40c4713fbc220cbaa.tar.gz
gcc-3adcf52c820f3a0bab965fd40c4713fbc220cbaa.tar.bz2
re PR debug/42800 (VLA DW_AT_upper_bound is no longer emitted)
PR debug/42800 * cfgexpand.c (expand_used_vars): Keep artificial non-ignored vars in cfun->local_decls even if they have register types. From-SVN: r157014
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r--gcc/cfgexpand.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index d9b5774..f5677a3 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -1331,8 +1331,7 @@ expand_used_vars (void)
if (is_gimple_reg (var))
{
TREE_USED (var) = 0;
- ggc_free (t);
- continue;
+ goto next;
}
/* We didn't set a block for static or extern because it's hard
to tell the difference between a global variable (re)declared
@@ -1353,20 +1352,20 @@ expand_used_vars (void)
TREE_USED (var) = 1;
if (expand_now)
+ expand_one_var (var, true, true);
+
+ next:
+ if (DECL_ARTIFICIAL (var) && !DECL_IGNORED_P (var))
{
- expand_one_var (var, true, true);
- if (DECL_ARTIFICIAL (var) && !DECL_IGNORED_P (var))
- {
- rtx rtl = DECL_RTL_IF_SET (var);
+ rtx rtl = DECL_RTL_IF_SET (var);
- /* Keep artificial non-ignored vars in cfun->local_decls
- chain until instantiate_decls. */
- if (rtl && (MEM_P (rtl) || GET_CODE (rtl) == CONCAT))
- {
- TREE_CHAIN (t) = cfun->local_decls;
- cfun->local_decls = t;
- continue;
- }
+ /* Keep artificial non-ignored vars in cfun->local_decls
+ chain until instantiate_decls. */
+ if (rtl && (MEM_P (rtl) || GET_CODE (rtl) == CONCAT))
+ {
+ TREE_CHAIN (t) = cfun->local_decls;
+ cfun->local_decls = t;
+ continue;
}
}