]>
git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.misc-tests/gcov-14.c
564b08eaa996024894e918515a09502e9d08cb51
1 /* Test gcov extern inline. */
3 /* { dg-options "-O2 -fprofile-arcs -ftest-coverage" } */
4 /* The following line arranges that Darwin has behavior like elf weak import. */
5 /* { dg-additional-options "-flat_namespace -undefined suppress" { target *-*-darwin* } } */
6 /* { dg-require-weak "" } */
7 /* { dg-do run { target native } } */
8 /* { dg-skip-if "undefined weak not supported" { alpha*-dec-osf* } } */
9 /* { dg-skip-if "undefined weak not supported" { { hppa*-*-hpux* } && { ! lp64 } } } */
11 extern int __attribute__ ((weak
)) Foo ();
13 extern __inline
int Foo ()
15 return 0; /* count(-) */
18 int (* __attribute__ ((noinline
)) Bar ()) ()
20 return Foo
; /* count(1) */
25 return Bar () != 0; /* count(1) */
28 /* { dg-final { run-gcov { -a gcov-14.c } } } */