diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/c-c++-common/asan/pr59063-1.c')
-rw-r--r-- | gcc-4.9/gcc/testsuite/c-c++-common/asan/pr59063-1.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/c-c++-common/asan/pr59063-1.c b/gcc-4.9/gcc/testsuite/c-c++-common/asan/pr59063-1.c new file mode 100644 index 000000000..a22db6a0d --- /dev/null +++ b/gcc-4.9/gcc/testsuite/c-c++-common/asan/pr59063-1.c @@ -0,0 +1,11 @@ +/* { dg-do run { target { *-*-linux* } } } */ + +#include <time.h> +static int weak_gettime (clockid_t clk_id, struct timespec *tp) + __attribute__((__weakref__("clock_gettime"))); +int main() { + if (!clock_gettime) + return 0; + struct timespec ts; + return weak_gettime(CLOCK_MONOTONIC, &ts); +} |