aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@gcc.gnu.org>2008-09-18 17:17:10 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2008-09-18 17:17:10 +0200
commit802e9f8e7ccb805437419eef74a9a1cbe75a68ed (patch)
tree898acbe389ec22bb548f7bcc5341513f81c694a6 /gcc/function.c
parenta2cd689a680e5287cbb4d704ca71092257583e96 (diff)
downloadgcc-802e9f8e7ccb805437419eef74a9a1cbe75a68ed.zip
gcc-802e9f8e7ccb805437419eef74a9a1cbe75a68ed.tar.gz
gcc-802e9f8e7ccb805437419eef74a9a1cbe75a68ed.tar.bz2
re PR debug/34037 (Bounds for VLAs not emitted into debuginfo)
PR debug/34037 * gimplify.c (gimplify_type_sizes): When not optimizing, ensure TYPE_MIN_VALUE and TYPE_MAX_VALUE is not is not DECL_IGNORED_P VAR_DECL. * cfgexpand.c (expand_used_vars): Keep DECL_ARTIFICIAL !DECL_IGNORED_P vars in local_decls list for instantiate_decls, ggc_free other TREE_LIST nodes from that chain. * function.c (instantiate_decls): Instantiate also DECL_RTL of vars in cfun->local_decls, free that list afterwards. From-SVN: r140459
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/gcc/function.c b/gcc/function.c
index 41c5a46..08dc95a 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -1634,7 +1634,7 @@ instantiate_decls_1 (tree let)
static void
instantiate_decls (tree fndecl)
{
- tree decl;
+ tree decl, t, next;
/* Process all parameters of the function. */
for (decl = DECL_ARGUMENTS (fndecl); decl; decl = TREE_CHAIN (decl))
@@ -1650,6 +1650,17 @@ instantiate_decls (tree fndecl)
/* Now process all variables defined in the function or its subblocks. */
instantiate_decls_1 (DECL_INITIAL (fndecl));
+
+ t = cfun->local_decls;
+ cfun->local_decls = NULL_TREE;
+ for (; t; t = next)
+ {
+ next = TREE_CHAIN (t);
+ decl = TREE_VALUE (t);
+ if (DECL_RTL_SET_P (decl))
+ instantiate_decl_rtl (DECL_RTL (decl));
+ ggc_free (t);
+ }
}
/* Pass through the INSNS of function FNDECL and convert virtual register