1 /* { dg-do compile } */
2 /* { dg-options "-O2" } */
3 /* { dg-skip-if "Not applicable for mcmodel=large" { aarch64*-*-* } { "-mcmodel=large" } { "" } } */
4
5 extern void __attribute__((weak)) foo_weakref (void);
6 void __attribute__((weak, noinline)) bar (void)
7 {
8 return;
9 }
10 void (*f) (void);
11 void (*g) (void);
12
13 int
14 main (void)
15 {
16 f = &foo_weakref;
17 g = &bar;
18 return 0;
19 }
20
21 /* { dg-final { scan-assembler-not "adr*foo_weakref" } } */
22 /* { dg-final { scan-assembler-not "\\.(word|xword)\tbar" } } */