blob: 34b089bda5b39e1237aeacb50673ba0def356fdd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
/* { dg-do compile } */
/* { dg-require-weak "" } */
/* { dg-options "-fno-common" } */
/* { dg-skip-if "" { x86_64-*-mingw* } { "*" } { "" } } */
/* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?a" } } */
/* { dg-final { scan-assembler-not "weak\[^ \t\]*\[ \t\]_?b" } } */
/* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?c" } } */
/* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?d" } } */
#pragma weak a
extern char a[];
char *user_a(void)
{
return a+1;
}
int x;
int extern inline b(int y)
{
return x+y;
}
extern int b(int y);
int user_b(int z)
{
return b(z);
}
#pragma weak c
extern int c;
int *user_c = &c;
#pragma weak d
extern char d[];
char *user_d = &d[1];
|