/* DWARF 2 debugging format support for GDB.
- Copyright (C) 1994-2015 Free Software Foundation, Inc.
+ Copyright (C) 1994-2016 Free Software Foundation, Inc.
Adapted by Gary Funck (gary@intrepid.com), Intrepid Technology,
Inc. with support from Florida State University (under contract
compilers pick up the new representation, we'll support this
practice. */
if (DW_UNSND (&attr) == DW_CC_program
- && cu->language == language_fortran)
+ && cu->language == language_fortran
+ && part_die->name != NULL)
set_objfile_main_name (objfile, part_die->name, language_fortran);
break;
case DW_AT_inline: