When building gdb with -O2 -flto=auto, we run into a few testsuite failures: ... FAIL: gdb.gdb/complaints.exp: clear complaints FAIL: gdb.gdb/selftest.exp: breakpoint in captured_main (got interactive prompt) FAIL: gdb.gdb/selftest.exp: run until breakpoint at captured_main ... Fi.i, we have: ... call clear_complaints()^M No symbol "clear_complaints" in current context.^M (gdb) FAIL: gdb.gdb/complaints.exp: clear complaints ...
IMO basically the only selftest worth preserving is the one that runs the internal unit tests. The others have been an ongoing source of problems like this.
Created attachment 12951 [details] Tentative patch
(In reply to Tom de Vries from comment #0) > FAIL: gdb.gdb/selftest.exp: breakpoint in captured_main (got interactive > prompt) > FAIL: gdb.gdb/selftest.exp: run until breakpoint at captured_main Patch submitted here (https://sourceware.org/pipermail/gdb-patches/2021-September/181786.html ) to handle this with UNTESTED.
(In reply to Tom Tromey from comment #1) > IMO basically the only selftest worth preserving is the one > that runs the internal unit tests. The others have been > an ongoing source of problems like this. Submitted "[gdb/testsuite] Reimplement complaints selftest as unittest" here ( https://sourceware.org/pipermail/gdb-patches/2021-September/181789.html ).
Fixed since 12.1.