(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.misc-tests/
gcov-pr85332.c
       1  /* { dg-options "-fprofile-arcs -ftest-coverage" } */
       2  /* { dg-do run { target native } } */
       3  
       4  int doit(int sel, int n, void *p)
       5  {
       6    int * const p0 = p;
       7  
       8    switch (sel)
       9    {
      10      case 0: /* count(3) */
      11        do {*p0 += *p0;} while (--n); /* count(3) */
      12        return *p0 == 0; /* count(1) */
      13  
      14      default:
      15        __builtin_abort ();
      16    }
      17  }
      18  
      19  int main()
      20  {
      21    int v0;
      22    v0 = 1; doit(0, 3, &v0);
      23    __builtin_exit (0);
      24  }
      25  
      26  /* { dg-final { run-gcov gcov-pr85332.c } } */