gcc-4.9.2-6.fc21.x86_64 -> gcc-5.3.1-2.fc23.x86_64 -PASS: gdb.fortran/library-module.exp: print var_i in lib +FAIL: gdb.fortran/library-module.exp: print var_i in lib -PASS: gdb.fortran/library-module.exp: print var_i in main +FAIL: gdb.fortran/library-module.exp: print var_i in main But that is not a bug in gfortran, it is a bug in GDB. It can be workarounded by: sed -i -e 's/GNU Fortran2008/GNU Fortran 008/' library-module-lib.so It is due to gdb/dwarf2read.c: /* Workaround gfortran PR debug/40040 - it uses DW_AT_location for variables in -fPIC libraries which may get overriden by other libraries/executable and get a different address. Resolve it by the minimal symbol which may come from inferior's executable using copy relocation. Make this workaround only for gfortran as for other compilers GDB cannot guess the minimal symbol Fortran mangling kind. */ if (cu->language == language_fortran && die->parent && die->parent->tag == DW_TAG_module && cu->producer && startswith (cu->producer, "GNU Fortran ")) ^^^^^^^^^^^^ SYMBOL_ACLASS_INDEX (sym) = LOC_UNRESOLVED; At least I think it is a bug in GDB but I do not have a fix.