aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/Wimplicit-fallthrough-9.c
blob: 394d6998b65549397d93fd00e7bac80f7b85618b (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
25
26
/* PR c/7652 */
/* { dg-do compile } */
/* { dg-options "-Wimplicit-fallthrough" } */

/* Test we don't remove FALLTHROUGH () too early.  */

extern void h (int);

void
g (int i)
{
  switch (i)
    {
    case 1:
      {
	switch (i)
	  {
	    case 3:
	      h (7);
	      __attribute__((fallthrough));
	    case 4:;
	  }
      }
    case 2:;
    }
}