summaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2008-09-18 15:17:10 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2008-09-18 15:17:10 +0000
commit78fa9ba7f63d3c9ea10d354dc38aad11a2965704 (patch)
tree898acbe389ec22bb548f7bcc5341513f81c694a6 /gcc/function.c
parent7c7ae05372b475b93ecde42ec706e5181941fb51 (diff)
downloadgcc-78fa9ba7f63d3c9ea10d354dc38aad11a2965704.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@140459 138bc75d-0d04-0410-961f-82ee72b054a4
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 41c5a46a621..08dc95a697c 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