1  /* { dg-require-effective-target alloca } */
       2  #include "analyzer-decls.h"
       3  
       4  void test_1 (int n)
       5  {
       6    struct
       7    {
       8      char a[n], b;
       9    } s;
      10    s.a[0] = 42;
      11    __analyzer_eval (s.a[0] == 42); /* { dg-warning "TRUE" } */
      12    s.b = 17;
      13    __analyzer_eval (s.b == 17); /* { dg-warning "TRUE" } */
      14  }
      15  
      16  void test_2 (int n)
      17  {
      18    int arr[n]; /* { dg-message "region created on stack here" } */
      19    __builtin_free (arr); /* { dg-warning "'free' of '<unknown>' which points to memory on the stack" } */
      20    // TODO: fix the "unknown" here
      21  }
      22  
      23  /* { dg-prune-output "\\\[-Wfree-nonheap-object" } */