This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/35006] [4.3 Regression] Segfault in remove_unused_locals
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Jan 2008 12:39:12 -0000
- Subject: [Bug tree-optimization/35006] [4.3 Regression] Segfault in remove_unused_locals
- References: <bug-35006-12387@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from rguenth at gcc dot gnu dot org 2008-01-29 12:39 -------
Uh, so the variable D.1574 is referenced from grub_cmdline_get and cl_delete,
but we have only one variable annotation, referenced from var->base.ann, where
we should in such a case use the per-function hashtable to associate var_anns
with the decls like we do for globals.
This cross-reference gets created by inlining here:
726 /* Global variables we didn't seen yet needs to go into
referenced
727 vars. */
728 if (gimple_in_ssa_p (cfun) && TREE_CODE (*tp) == VAR_DECL)
729 add_referenced_var (*tp);
as auto_var_in_fn_p returns false in inlining cl_print into cl_delete.
Note that the variable is referenced from the VLA buf type which is referenced
from the BLOCK_VARS.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35006