]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
testsuite, fortran: adapt tests for ifort's 'start' behavior
authorNils-Christian Kempke <nils-christian.kempke@intel.com>
Fri, 20 May 2022 08:25:57 +0000 (10:25 +0200)
committerIjaz, Abdul B <abdul.b.ijaz@intel.com>
Thu, 7 Sep 2023 22:35:18 +0000 (00:35 +0200)
commit41439185cd0075bbb1aedf9665685dba0827cfec
treea4dcab5c737f986a81628e5be6349d2e7c7fb8a1
parent6fe8aea3c0b848cfca8a9dbeb6df42d51af2b18c
testsuite, fortran: adapt tests for ifort's 'start' behavior

The modified tests array-slices-bad.exp and vla-type.exp both set a
breakpoint at the first real statement in the respective executables.

Normally, the expected behavior of fortran_runto_main for these would be
the stopping of the debugger at exactly the first statment in the code.

Strangely, neither gfortran nor ifx seem to do this for these tests.
Instead, issuing 'start' in ifx (for either of the 2 tests) lets GDB
stop at the 'program ...' line and gfortran stops at a variable
declaration line.  E.g. for vla-type it stops at

  41        type(five)               :: fivearr (2)

So, actually, ifort's behavior can be considered to be a bit more
'correct' here.  This patch remove the fortran_runto_main in the
two tests and instead uses runto to directly run to the first breakpoint
set at the first program statement.  This works with both compiler
behaviors and makes the tests more robust.

Approved-by: Kevin Buettner <kevinb@redhat.com>
gdb/testsuite/gdb.fortran/array-slices-bad.exp
gdb/testsuite/gdb.fortran/vla-type.exp