binutils-gdb/gdb/testsuite/gdb.base/gdbvars.c
David Blaikie 2abc3f8d59 Ensure unreferenced static symbols aren't omitted by clang (either marking them __attribute__((used)) or making them non-static)
gdb/testsuite/
       * gdb.base/catch-syscall.c: Make unreferenced statics non-static to
       ensure clang would not discard them.
       * gdb.base/gdbvars.c: Ditto.
       * gdb.base/memattr.c: Ditto.
       * gdb.base/whatis.c: Ditto.
       * gdb.python/py-prettyprint.c: Ditto.
       * gdb.trace/actions.c: Ditto.
       * gdb.cp/ptype-cv-cp.cc: Mark unused global const int as used to
       ensure clang would not discard it.
2014-04-24 22:33:46 -07:00

24 lines
202 B
C

/* Simple program to help exercise gdb's convenience variables. */
typedef void *ptr;
ptr p = &p;
void
foo_void (void)
{
}
int
foo_int (void)
{
return 0;
}
int
main ()
{
p = &p;
return 0;
}