[Bug fortran/60060] [4.9 Rgression] lto1: internal compiler error: in add_AT_specification, at dwarf2out.c:4096

2014-02-05 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60060

Richard Biener  changed:

   What|Removed |Added

 CC||hubicka at gcc dot gnu.org

--- Comment #3 from Richard Biener  ---
Another possibility is to simply stream the FEs idea of what is a global ...


[Bug fortran/60060] [4.9 Rgression] lto1: internal compiler error: in add_AT_specification, at dwarf2out.c:4096

2014-02-05 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60060

--- Comment #2 from Richard Biener  ---
The issue is that we create the DIE for the namelist before we've emitted
DIEs for global vars.  Thus we run into

static dw_die_ref
gen_namelist_decl (tree name, dw_die_ref scope_die, tree item_decls)
{
...
  FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (item_decls), i, value)
{
  nml_item_ref_die = lookup_decl_die (value);
  if (!nml_item_ref_die)
nml_item_ref_die = force_decl_die (value);

which forces the creation of a DIE for mem_nml as context of nxc and
creates a declaration DIE of nxc in that context.

The actual AT_specification is added when we output debuginfo for mem_nml
but then again via emit_debug_global_declarations.

Without LTO we don't call dwarf2out_global_decl on mem_nml::NXC.

I believe that somehow we have to honor TREE_ASM_WRITTEN here to avoid
outputting the decl twice ...?

That said, frontends disconnect on what are "globals" is obviously an
area to improve upon ... as is removing the various langhooks around
this area (write_global_declarations) in the light of cgraph/varpool/symtab.


[Bug fortran/60060] [4.9 Rgression] lto1: internal compiler error: in add_AT_specification, at dwarf2out.c:4096

2014-02-05 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60060

Richard Biener  changed:

   What|Removed |Added

   Keywords||lto
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-02-05
  Component|debug   |fortran
   Target Milestone|--- |4.9.0
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
Confirmed.