1  /* { dg-do compile } */
       2  /* { dg-require-effective-target alloca } */
       3  /* { dg-options "-O2 -fdump-tree-dse1-details" } */
       4  
       5  int i;
       6  int *foo (int bogus, int n)
       7  {
       8    int a[n];
       9    a[2] = bogus; /* Should elide this store since a cannot escape.  */
      10    int *p;
      11    if (bogus)
      12      p = &a[2];
      13    else
      14      p = &i;
      15    return p;         /* { dg-warning "\\\[-Wreturn-local-addr" } */
      16  }
      17  
      18  /* { dg-final { scan-tree-dump "Deleted dead store" "dse1" } } */