From c9d235825985930269186fbef1f9175007314141 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cbhkumarn=E2=80=9D?= Date: Fri, 8 Oct 2021 23:23:22 +0530 Subject: [PATCH] [gdb.fortran] Skip additional continue command for clang. If there is an "allocatable" keyword in the declaration like in gdb.fortran/array-slices-bad.f90:23, then gcc emits an .debug_line entry for this. Hence in gdb.fortran/array-slices-bad.exp, it require additional "continue" command to reach "First Breakpoint" from MAIN__. Whereas clang does not emit .debug_line information for such declarations, hence MAIN_ and "First Breakpoint" points to same location and it does not require additional "continue" command to reach "First Breakpoint". This test case change is done for clang compiler alone. --- gdb/testsuite/gdb.fortran/array-slices-bad.exp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.fortran/array-slices-bad.exp b/gdb/testsuite/gdb.fortran/array-slices-bad.exp index a68903498d6..b592eb51d92 100644 --- a/gdb/testsuite/gdb.fortran/array-slices-bad.exp +++ b/gdb/testsuite/gdb.fortran/array-slices-bad.exp @@ -34,7 +34,9 @@ gdb_breakpoint [gdb_get_line_number "First Breakpoint"] gdb_breakpoint [gdb_get_line_number "Second Breakpoint"] gdb_breakpoint [gdb_get_line_number "Final Breakpoint"] -gdb_continue_to_breakpoint "First Breakpoint" +if ![test_compiler_info "clang-*"] { + gdb_continue_to_breakpoint "First Breakpoint" +} # Access not yet allocated array. gdb_test "print other" " = " -- 2.17.1