(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
c2x-attr-fallthrough-4.c
       1  /* Test C2x fallthrough attribute: duplicates (allowed after N2557).  */
       2  /* { dg-do compile } */
       3  /* { dg-options "-std=c2x -pedantic-errors" } */
       4  
       5  int
       6  f (int a)
       7  {
       8    switch (a)
       9      {
      10      case 1:
      11        a++;
      12        [[fallthrough, __fallthrough__]]; /* { dg-warning "specified multiple times" } */
      13      case 2:
      14        a++;
      15        [[fallthrough]] [[fallthrough]]; /* { dg-warning "specified multiple times" } */
      16      case 3:
      17        a++;
      18      }
      19    return a;
      20  }