blob: 7e5f062e05859d9dee7f8b53f10ce951dfe591ed (
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
|
// { dg-do compile }
// { dg-options "-O" }
// Make sure inlined non-outlined functions aren't marked weak.
// We'd get a ".weak xyzzy" annotation trigged by the second declaration.
// { dg-final { scan-assembler-not "weak\[^ \t\]*\[ \t\]_?xyzzy" } }
// The next check isn't really part of the actual test, just to make
// sure there's no outline-copy of xyzzy, because if that really
// happened, it *should* be marked linkonce or perhaps weak.
// { dg-final { scan-assembler-not "xyzzy" } }
extern int x;
extern void foo(void);
extern void bar(void);
extern "C" inline int xyzzy(int a)
{
foo();
return a + x;
}
extern "C" int xyzzy(int);
extern inline int plugh(int c)
{
return xyzzy (c);
}
int y;
void doit(int b)
{
y = xyzzy (b) + plugh (b);
}
|