1 /* { dg-do compile } */
2 /* { dg-require-weak "" } */
3 /* { dg-options "-fno-common" } */
5 /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?ffoo1a" } } */
6 /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?ffoo1b" } } */
7 /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?ffoo1c" } } */
8 /* { dg-final { scan-assembler-not "weak\[^ \t\]*\[ \t\]_?ffoo1d" } } */
9 /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?ffoo1e" } } */
11 /* test function addresses with #pragma weak */
14 extern void * ffoo1a (void);
17 return (void *)ffoo1a
;
20 extern void * ffoo1b (void);
24 return (void *)ffoo1b
;
27 extern void * ffoo1c (void); /* { dg-warning "applying #pragma weak" "applying #pragma weak" } */
30 return (void *)ffoo1c
;
39 extern void * ffoo1e (void);