(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
pr86058.c
       1  /* PR middle-end/86058 - TARGET_MEM_REF causing incorrect message for
       2     -Wmaybe-uninitialized warning
       3     The test fails on a number of non-x86 targets due to pr100073.
       4     { dg-do compile { target i?86-*-* x86_64-*-* } }
       5     { dg-options "-O2 -Wuninitialized -Wmaybe-uninitialized" } */
       6  
       7  extern void foo (int *);
       8  
       9  void zip (int *out, int indx)
      10  {
      11    int arr[10];
      12  
      13    for (int i = 0; i < indx; ++i)
      14      out[i] = arr[i] + 1;  // { dg-warning "'arr\\\[i]' may be used uninitialized" "pr99944" { xfail *-*-* } }
      15                            // { dg-warning "'arr' may be used uninitialized" "actual" { target *-*-* } .-1 }
      16  
      17    foo (arr);
      18    foo (out);
      19  }