1  /* HAVE_AS_DWARF2_DEBUG_LINE macro needs to be defined to pass the unittest.
       2     However, dg cannot access it, so we restrict to GNU targets.  */
       3  /* { dg-do compile { target *-*-gnu* } } */
       4  /* { dg-options "-O0 -gdwarf -gno-column-info" } */
       5  /* { dg-final { scan-assembler "loc \[0-9] 11 \[0-9]( is_stmt \[0-9])?\n" } } */
       6  /* { dg-final { scan-assembler "loc \[0-9] 11 \[0-9]( is_stmt \[0-9])? discriminator 2\n" } } */
       7  /* { dg-final { scan-assembler "loc \[0-9] 11 \[0-9]( is_stmt \[0-9])? discriminator 1\n" } } */
       8  
       9  int foo(int n) {
      10    int i, ret = 0;
      11    for (i = 0; i < n; i++) {
      12      if (i % 10 == 1)
      13        ret++;
      14      else
      15        ret--;
      16    }
      17    return ret;
      18  }