]>
git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/weak/weak-16.c
2 /* { dg-do compile } */
3 /* { dg-require-weak "" } */
4 /* { dg-options "-fno-common -Os" } */
5 /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?kallsyms_token_index" } } */
6 /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?kallsyms_token_table" } } */
7 /* { dg-skip-if "" { x86_64-*-mingw* } } */
8 /* NVPTX's weak is applied to the definition, not declaration. */
9 /* { dg-skip-if "" { nvptx-*-* } } */
11 extern int kallsyms_token_index
[] __attribute__((weak
));
12 extern int kallsyms_token_table
[] __attribute__((weak
));
13 void kallsyms_expand_symbol(int *result
)
18 tptr
= &kallsyms_token_table
[ kallsyms_token_index
[*result
] ];