mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-24 12:35:55 +08:00
3089759191
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.
44 lines
591 B
C
44 lines
591 B
C
#include "list0.h"
|
|
|
|
int main ()
|
|
{
|
|
int x;
|
|
|
|
x = 0;
|
|
foo (x++);
|
|
foo (x++);
|
|
foo (x++);
|
|
foo (x++);
|
|
foo (x++);
|
|
foo (x++);
|
|
foo (x++);
|
|
foo (x++);
|
|
foo (x++);
|
|
foo (x++);
|
|
foo (x++);
|
|
foo (x++);
|
|
foo (x++);
|
|
foo (x++);
|
|
foo (x++);
|
|
foo (x++);
|
|
foo (x++);
|
|
foo (x++);
|
|
foo (x++);
|
|
foo (x++);
|
|
foo (x++);
|
|
foo (x++);
|
|
foo (x++);
|
|
foo (x++);
|
|
foo (x++);
|
|
foo (x++);
|
|
foo (x++);
|
|
foo (x++);
|
|
return 0;
|
|
}
|
|
|
|
static void __attribute__ ((used))
|
|
unused ()
|
|
{
|
|
/* Not used for anything */
|
|
} /* last line */
|