return -1
}
-if ![fortran_runto_main] then {
+if {![fortran_runto_main]} {
perror "couldn't run to main"
- continue
+ return
}
# Depending on the compiler being used, the type names can be printed
gdb_breakpoint [gdb_get_line_number "Display namelist"]
gdb_continue_to_breakpoint "Display namelist"
-if {[test_compiler_info {gcc-*}]} {
+# DW_TAG_namelist is supported starting gcc 4.9.
+set supported [expr \
+ [test_compiler_info {gfortran-*} f90] \
+ && [gcc_major_version {gfortran-*} f90] >= 4.9]
+if { $supported } {
gdb_test "ptype nml" \
"type = Type nml\r\n *$int :: a\r\n *$int :: b\r\n *End Type nml"
gdb_test "print nml" \