aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-text-indented-show-levels.c
blob: f44c8eb458d27cbd4be10208164d258495c673b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* { dg-do compile } */
/* { dg-options "-fdiagnostics-set-output=text:experimental-nesting=yes,experimental-nesting-show-levels=yes" } */

extern void foo (void);

void test_nesting (void)
{
  foo (); /* { dg-error "top-level error" } */
}

/* { dg-begin-multiline-output "" }
  * (level 1):child 0
    * (level 2):grandchild 0 0
    * (level 2):grandchild 0 1
    * (level 2):grandchild 0 2
  * (level 1):child 1
    * (level 2):grandchild 1 0
    * (level 2):grandchild 1 1
    * (level 2):grandchild 1 2
  * (level 1):child 2
    * (level 2):grandchild 2 0
    * (level 2):grandchild 2 1
    * (level 2):grandchild 2 2
   { dg-end-multiline-output "" } */