diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/lto/pr60820_0.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/lto/pr60820_0.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/lto/pr60820_0.c b/gcc/testsuite/gcc.dg/lto/pr60820_0.c new file mode 100644 index 00000000000..349cf6a02f1 --- /dev/null +++ b/gcc/testsuite/gcc.dg/lto/pr60820_0.c @@ -0,0 +1,13 @@ +/* { dg-lto-do link } */ +/* { dg-lto-options {{-flto -r -nostdlib -O2}} } */ +#include <stdio.h> +struct in6_addr {int bah;}; +extern const struct in6_addr in6addr_any; +static const struct in6_addr local_in6addr_any = {1}; +#pragma weak in6addr_any = local_in6addr_any + +__attribute__ ((used)) +void foo2() +{ + fprintf (stderr, "v1: %p, v2: %p\n", &local_in6addr_any, &in6addr_any); +} |