[PATCH] Fix detection of gfortran compilers.

Bernhard Heckel
2016-02-22T14:49:52Z

From: "bernhard.heckel" <bernhard.heckel@intel.com>

Newer gfortran compilers changed naming convention in DW_AT_producer tag.
For example "GNU Fortran 4.6.3" vs "GNU Fortran2008 5.3.0"

2016-02-10 Bernhard Heckel <bernhard.heckel@intel.com>

gdb/Changelog:

* dwarf2read.c (new_symbol_full): Fix detection of gfortran compilers.

---
gdb/dwarf2read.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 1020c12..dcd49e3 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -18506,7 +18506,7 @@ new_symbol_full (struct die_info *die, struct type *type, struct dwarf2_cu *cu,
if (cu->language == language_fortran && die->parent
&& die->parent->tag == DW_TAG_module
&& cu->producer
- && startswith (cu->producer, "GNU Fortran "))
+ && startswith (cu->producer, "GNU Fortran"))
SYMBOL_ACLASS_INDEX (sym) = LOC_UNRESOLVED;

/* A variable with DW_AT_external is never static,
--
2.7.1.339.g0233b80