[PATCH] Fix testcases with required but unreferenced functions and variables

Pedro Alves pedro@palves.net
Fri Oct 9 16:16:04 GMT 2020


On 10/7/20 5:39 PM, Gary Benson via Gdb-patches wrote:
> Hi all,
> 
> A number of testcases define variables and/or functions which are
> referenced by GDB during the test, but which are not referenced from
> within the test executable.  Clang correctly recognizes that these
> variables and functions are unused, and optimizes them out, causing
> the testcases in question to fail.  This patch adds __attribute__
> ((used)) in various places to prevent this.
> 
> Checked on Fedora 32 x86_64, with GCC and Clang.  Ok to commit?

OK.

Thanks,
Pedro Alves


More information about the Gdb-patches mailing list