]>
Commit | Line | Data |
---|---|---|
5366b186 NS |
1 | /* Test gcov extern inline. */ |
2 | ||
3 | /* { dg-options "-O2 -fprofile-arcs -ftest-coverage" } */ | |
173a8c50 | 4 | /* The following line arranges that Darwin has behavior like elf weak import. */ |
a163acfa | 5 | /* { dg-additional-options "-flat_namespace -undefined suppress" { target *-*-darwin* } } */ |
5366b186 NS |
6 | /* { dg-require-weak "" } */ |
7 | /* { dg-do run { target native } } */ | |
eab08fec | 8 | /* { dg-skip-if "undefined weak not supported" { { hppa*-*-hpux* } && { ! lp64 } } } */ |
5366b186 NS |
9 | |
10 | extern int __attribute__ ((weak)) Foo (); | |
11 | ||
12 | extern __inline int Foo () | |
13 | { | |
14 | return 0; /* count(-) */ | |
15 | } | |
16 | ||
17 | int (* __attribute__ ((noinline)) Bar ()) () | |
18 | { | |
19 | return Foo; /* count(1) */ | |
20 | } | |
21 | ||
22 | int main () | |
23 | { | |
24 | return Bar () != 0; /* count(1) */ | |
25 | } | |
26 | ||
27 | /* { dg-final { run-gcov { -a gcov-14.c } } } */ |