[Bug fortran/59440] [4.9 Regression] ICE in force_decl_die, at dwarf2out.c:20111 with -g

burnus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Dec 18 22:01:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59440

--- Comment #8 from Tobias Burnus <burnus at gcc dot gnu.org> ---
The problem is the following code in tree-nested.c:


/* A subroutine of convert_local_reference.  Create a local variable
   in the parent function with DECL_VALUE_EXPR set to reference the
   field in FRAME.  This is used both for debug info and in OpenMP
   lowering.  */

static tree
get_local_debug_decl (struct nesting_info *info, tree decl, tree field)
{
...
  new_decl = build_decl (DECL_SOURCE_LOCATION (decl),
                         VAR_DECL, DECL_NAME (decl), TREE_TYPE (decl));
  DECL_IGNORED_P (new_decl) = DECL_IGNORED_P (decl);
...
  /* Do not emit debug info twice.  */
  DECL_IGNORED_P (decl) = 1;
}


Result: new_decl gets emitted due to DECL_IGNORED_P being copied - but the
NAMELIST_DECL still points to the 'old' decl, which now has DECL_IGNORED_P() =
1.



More information about the Gcc-bugs mailing list