forked from Imagelibrary/binutils-gdb
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:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user