From 802e9f8e7ccb805437419eef74a9a1cbe75a68ed Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 18 Sep 2008 17:17:10 +0200 Subject: 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 --- gcc/function.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'gcc/function.c') 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 -- cgit v1.1