1 /* { dg-do compile } */
2 /* { dg-require-weak "" } */
3 /* { dg-options "-fno-common" } */
5 /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?vfoo1a" } } */
6 /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?vfoo1b" } } */
7 /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?vfoo1c" } } */
8 /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?vfoo1d" } } */
9 /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?vfoo1e" } } */
10 /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?vfoo1f" } } */
11 /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?vfoo1g" } } */
12 /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?vfoo1h" } } */
13 /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?vfoo1i" } } */
14 /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?vfoo1j" } } */
15 /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?vfoo1k" } } */
17 /* test variable addresses with #pragma weak */
23 return (void *)&vfoo1a
;
31 return (void *)&vfoo1b
;
35 extern int vfoo1c
; /* { dg-warning "applying #pragma weak" "applying #pragma weak" } */
38 return (void *)&vfoo1c
;
47 return (void *)&vfoo1d
;
55 return (void *)&vfoo1e
;
62 return (void *)&vfoo1f
;
67 extern int vfoo1g
; /* { dg-warning "applying #pragma weak" "applying #pragma weak" } */
70 return (void *)&vfoo1g
;
79 return (void *)&vfoo1h
;
89 return (void *)&vfoo1i
;
98 return (void *)&vfoo1j
;