1  /* PR middle-end/100250 - ICE related to -Wmaybe-uninitialized
       2     { dg-do compile }
       3     { dg-options "-O2 -Wall" }
       4     { dg-require-effective-target alloca } */
       5  
       6  extern void f (int D, const int[D], const int[D]);
       7  
       8  void g (int D, const int a[D], const int b[D], const int c[D], const int d[D])
       9  {
      10    int c2[D];
      11  
      12    for (int i = 0; i < D; i++) {
      13  
      14      if (a[i] >= D) __builtin_abort ();
      15      if (b[i] != d[a[i]]) __builtin_abort ();
      16  
      17      c2[a[i]] = c[i];
      18    }
      19  
      20    f (D, d, c2);
      21  }
      22  
      23  void h (int D, const int d[D])
      24  {
      25    int a[D];
      26    int b[D];
      27    int c[D];
      28  
      29    g (D, a, b, c, d);          // { dg-warning "-Wmaybe-uninitialized" }
      30  }