mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-15 04:31:49 +08:00
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.
This commit is contained in:
parent
ced4a4c1cc
commit
3089759191
@ -1,3 +1,8 @@
|
||||
2020-10-06 Gary Benson <gbenson@redhat.com>
|
||||
|
||||
* gdb.base/list0.c (unused): Add __attribute__ ((used)).
|
||||
* gdb.base/list1.c (unused): Likewise.
|
||||
|
||||
2020-10-06 Gary Benson <gbenson@redhat.com>
|
||||
|
||||
* gdb.base/list-ambiguous0.c (ambiguous_var): Add
|
||||
|
@ -36,7 +36,7 @@ int main ()
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
static void __attribute__ ((used))
|
||||
unused ()
|
||||
{
|
||||
/* Not used for anything */
|
||||
|
@ -12,7 +12,7 @@ void bar (int x)
|
||||
long_line ();
|
||||
}
|
||||
|
||||
static void
|
||||
static void __attribute__ ((used))
|
||||
unused ()
|
||||
{
|
||||
/* Not used for anything */
|
||||
|
Loading…
Reference in New Issue
Block a user