]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/testsuite/ChangeLog
gdb/fortran: Breakpoint location is modified.
authorBhuvanendra Kumar N <Bhuvanendra.KumarN@amd.com>
Tue, 11 May 2021 11:56:46 +0000 (17:26 +0530)
committerAlok Kumar Sharma <AlokKumar.Sharma@amd.com>
Tue, 11 May 2021 12:20:00 +0000 (17:50 +0530)
commitabb894a4703ddf1d2f4b9c103d63f911c017e26a
treebf97208bef9ef24c9a77a8e6d19a19f88c13bfcf
parent8ca5537ba56b72518353541784b2b0a49c978893
gdb/fortran: Breakpoint location is modified.

Breakpoint location is modified to "return" statement which is
outside the DO loop. Because the label 100 of DO loop should get
executed for each iteration as shared in this external link:
http://www-pnp.physics.ox.ac.uk/~gronbech/intfor/node18.html.
flang compiler is following this fortran standard, whereas gfortran
compiler is not following, hence the test case is passing with
gfortran and failing with flang. but to correct this gfortran
behavior, bug has been filed in bugzilla
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99816). As reported in
the bug, with gfortran, label 100 of DO loop is reached only after
the completion of the entire DO loop. Hence at label 100, all the
array elements are set and printing of array element a(2) succeeds.
whereas with flang, when we are at label 100 for first time, array
element a(2) is not yet set, only a(1) is set, hence moving the
breakpoint location to outside the DO loop, so that once we are
outside the DO loop, we can print any of the array elements. This
change in test case is done irrespective of any fortran compiler.

gdb/testsuite/ChangeLog:
        * gdb.fortran/array-element.exp: Breakpoint location is modified.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.fortran/array-element.exp