With target board unix/-m32, I run into: ... FAIL: gdb.fortran/lbound-ubound.exp: test 12: check value of lbound ('array_1d_4bytes_overflow') expression FAIL: gdb.fortran/lbound-ubound.exp: test 12: check value of ubound ('array_1d_4bytes_overflow') expression FAIL: gdb.fortran/lbound-ubound.exp: test 12: lbounds match FAIL: gdb.fortran/lbound-ubound.exp: test 12: ubounds match FAIL: gdb.fortran/lbound-ubound.exp: p lbound(array_1d_4bytes_overflow, 1, 8) ... In more detail: ... (gdb) p lbound (array_1d_4bytes_overflow)^M $71 = (2147483644)^M (gdb) FAIL: gdb.fortran/lbound-ubound.exp: test 12: check value of lbound ('array_1d_4bytes_overflow') expression p ubound (array_1d_4bytes_overflow)^M $72 = (-2147483637)^M (gdb) FAIL: gdb.fortran/lbound-ubound.exp: test 12: check value of ubound ('array_1d_4bytes_overflow') expression ... With native instead I get: ... (gdb) p lbound (array_1d_4bytes_overflow)^M $71 = (2147483644)^M (gdb) PASS: gdb.fortran/lbound-ubound.exp: test 12: check value of lbound ('array_1d_4bytes_overflow') expression p ubound (array_1d_4bytes_overflow)^M $72 = (-2147483637)^M (gdb) PASS: gdb.fortran/lbound-ubound.exp: test 12: check value of ubound ('array_1d_4bytes_overflow') expression ... Hmm, that's the same output, so the difference is in the expected value. Let's annotate that in the test name: ... diff --git a/gdb/testsuite/gdb.fortran/lbound-ubound.exp b/gdb/testsuite/gdb.fortran/lbound -ubound.exp index 334713666e0..f4093092a11 100644 --- a/gdb/testsuite/gdb.fortran/lbound-ubound.exp +++ b/gdb/testsuite/gdb.fortran/lbound-ubound.exp @@ -137,10 +137,10 @@ while { $test_count < 500 } { # lower bounds for an array. set pattern [string_to_regexp " = $expected_lbound"] gdb_test "p lbound ($array_name)" "$pattern" \ - "check value of lbound ('$array_name') expression" + "check value of lbound ('$array_name') expression, expected: $expected_lbound" set pattern [string_to_regexp " = $expected_ubound"] gdb_test "p ubound ($array_name)" "$pattern" \ - "check value of ubound ('$array_name') expression" + "check value of ubound ('$array_name') expression, expected: $expected_ubound" # Now ask for each bound in turn and check it against the # expected results. ... That's a mismatch indeed: ... (gdb) p lbound (array_1d_4bytes_overflow)^M $71 = (2147483644)^M (gdb) FAIL: gdb.fortran/lbound-ubound.exp: test 12: check value of lbound ('array_1d_4bytes_overflow') expression, expected: (1) p ubound (array_1d_4bytes_overflow)^M $72 = (-2147483637)^M (gdb) FAIL: gdb.fortran/lbound-ubound.exp: test 12: check value of ubound ('array_1d_4bytes_overflow') expression, expected: (0) ...
https://sourceware.org/pipermail/gdb-patches/2022-April/188248.html
The referenced patch was reviewed and was pushed to master. This should close the ticket.
Fixed, thanks.