if {[skip_fortran_tests]} { return -1 }
+# This test relies on output from the inferior.
+if [target_info exists gdb,noinferiorio] {
+ return -1
+}
+
standard_testfile ".f90"
load_lib fortran.exp
return -1
}
- # This test relies on output from the inferior and is not supported on
- # remote targets.
- if {![gdb_is_target_native]} {
- return 0
- }
-
# Avoid libc symbols, in particular the 'array' type.
gdb_test_no_output "nosharedlibrary"
set found_final_breakpoint false
set expected_result ""
set func_name ""
+ set found_prompt false
gdb_test_multiple "continue" "continue" {
+ -i $::inferior_spawn_id
+
-re ".*GDB = (\[^\r\n\]+)\r\n" {
set expected_result $expect_out(1,string)
- exp_continue
+ if {!$found_prompt} {
+ exp_continue
+ }
}
+
+ -i $::gdb_spawn_id
+
-re "! Display Element" {
set func_name "show_elem"
exp_continue
exp_continue
}
-re "$gdb_prompt $" {
- # We're done.
+ set found_prompt true
+
+ if {$found_final_breakpoint
+ || ($expected_result != "" && $func_name != "")} {
+ # We're done.
+ } else {
+ exp_continue
+ }
}
}
end if
write(*, fmt="(I0)", advance="no") array (i)
end do
- write(*, fmt="(A)", advance="no") ")"
+ write(*, fmt="(A)", advance="yes") ")"
print *, "" ! Display Array Slice 1D
end subroutine show_1d
return -1
}
-# This test relies on output from the inferior and is not supported on
-# remote targets.
-if {![gdb_is_target_native]} {
+# This test relies on output from the inferior.
+if [target_info exists gdb,noinferiorio] {
return 0
}
set expected_lbound ""
set expected_ubound ""
+ set found_prompt false
gdb_test_multiple "continue" "continue" {
+ -i $::inferior_spawn_id
+
-re ".*LBOUND = (\[^\r\n\]+)\r\n" {
set expected_lbound $expect_out(1,string)
- exp_continue
+ if {!$found_prompt} {
+ exp_continue
+ }
}
-re ".*UBOUND = (\[^\r\n\]+)\r\n" {
set expected_ubound $expect_out(1,string)
- exp_continue
+ if {!$found_prompt} {
+ exp_continue
+ }
}
+
+ -i $::gdb_spawn_id
+
-re "! Test Breakpoint" {
set func_name "show_elem"
exp_continue
exp_continue
}
-re "$gdb_prompt $" {
- # We're done.
+ set found_prompt true
+
+ if {$found_final_breakpoint
+ || ($expected_lbound != "" && $expected_ubound != "")} {
+ # We're done.
+ } else {
+ exp_continue
+ }
}
}