(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.misc-tests/
gcov-14.c
       1  /* Test gcov extern inline.  */
       2  
       3  /* { dg-do run { target native } } */
       4  /* { dg-options "-O2 -fprofile-arcs -ftest-coverage -fgnu89-inline" } */
       5  /* The following line arranges that Darwin has behavior like elf weak import.  */
       6  /* { dg-additional-options "-flat_namespace -undefined suppress" { target *-*-darwin* }  } */
       7  /* { dg-require-weak "" } */
       8  /* { dg-skip-if "undefined weak not supported" { { hppa*-*-hpux* } && { ! lp64 } } } */
       9  /* { dg-skip-if "undefined weak not supported" { powerpc-ibm-aix* } } */
      10  
      11  extern int __attribute__ ((weak)) Foo ();
      12  
      13  extern __inline int Foo ()
      14  {
      15    return 0; /* count(-) */
      16  }
      17  
      18  int (* __attribute__ ((noinline)) Bar ()) ()
      19  {
      20    return Foo; /* count(1) */
      21  }
      22  
      23  int main ()
      24  {
      25    return Bar () != 0; /* count(1) */
      26  }
      27  
      28  /* { dg-final { run-gcov { -a gcov-14.c } } } */