Fix gdb.base/list.exp with Clang
authorGary Benson <gbenson@redhat.com>
Tue, 6 Oct 2020 14:08:37 +0000 (15:08 +0100)
committerGary Benson <gbenson@redhat.com>
Tue, 6 Oct 2020 14:08:37 +0000 (15:08 +0100)
commit308975919152fbf301861d88e2da9b522e3cf112
tree07dc6d7b19049a35febae66fe3e8caee3867b0d8
parentced4a4c1ccfa637940fc17dd3160727793d8b8f2
Fix gdb.base/list.exp with Clang

Two subtests of gdb.base/list.exp failed when built with Clang
because the unused function "unused" was optimized out.  This
commit adds __attribute__ ((used)) to both definitions.

gdb/testsuite/ChangeLog:

* gdb.base/list0.c (unused): Add __attribute__ ((used)).
* gdb.base/list1.c (unused): Likewise.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/list0.c
gdb/testsuite/gdb.base/list1.c