(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
Wunused-var-4.c
       1  /* PR c/96571 */
       2  /* { dg-do compile } */
       3  /* { dg-options "-std=c99 -O2 -Wunused-but-set-variable" } */
       4  
       5  enum E { V };
       6  
       7  int
       8  foo (void)
       9  {
      10    enum E v;				/* { dg-bogus "set but not used" } */
      11    return _Generic (v, enum E : 0);
      12  }
      13  
      14  int
      15  bar (void)
      16  {
      17    int a = 0;				/* { dg-bogus "set but not used" } */
      18    return _Generic (0, int : a);
      19  }
      20  
      21  int
      22  baz (void)
      23  {
      24    int a;				/* { dg-bogus "set but not used" } */
      25    return _Generic (0, long long : a, int : 0);
      26  }
      27  
      28  int
      29  qux (void)
      30  {
      31    int a;				/* { dg-bogus "set but not used" } */
      32    return _Generic (0, long long : a, default: 0);
      33  }