(root)/
gcc-13.2.0/
gcc/
testsuite/
c-c++-common/
Wunused-var-17.c
       1  /* PR c++/93557 */
       2  /* { dg-do compile } */
       3  /* { dg-options "-O2 -Wunused-but-set-variable" } */
       4  
       5  typedef int VI __attribute__((vector_size (sizeof (int) * 4)));
       6  typedef float VF __attribute__((vector_size (sizeof (float) * 4)));
       7  
       8  void
       9  foo (VI *p, VF *q)
      10  {
      11    VI a = (VI) { 1, 2, 3, 4 };			/* { dg-bogus "set but not used" } */
      12    q[0] = __builtin_convertvector (a, VF);
      13    VI b = p[1];					/* { dg-bogus "set but not used" } */
      14    q[1] = __builtin_convertvector (b, VF);
      15    VF c = (VF) { 5.0f, 6.0f, 7.0f, 8.0f };	/* { dg-bogus "set but not used" } */
      16    p[2] = __builtin_convertvector (c, VI);
      17    VF d = q[3];					/* { dg-bogus "set but not used" } */
      18    p[3] = __builtin_convertvector (d, VI);
      19  }