/* Generated by Frama-C */
#include "stddef.h"
#include "stdio.h"
int LEN = 10;
int main(int argc, char **argv)
{
  int __retres;
  unsigned long __lengthof_arr;
  int i;
  __e_acsl_memory_init(& argc,& argv,(size_t)8);
  {
    int __gen_e_acsl_and;
    if (0L < 4L * LEN) {
      __e_acsl_mpz_t __gen_e_acsl_;
      __e_acsl_mpz_t __gen_e_acsl__2;
      int __gen_e_acsl_le;
      __gmpz_init_set_si(__gen_e_acsl_,4L * LEN);
      __gmpz_init_set_ui(__gen_e_acsl__2,18446744073709551615UL);
      __gen_e_acsl_le = __gmpz_cmp((__e_acsl_mpz_struct const *)(__gen_e_acsl_),
                                   (__e_acsl_mpz_struct const *)(__gen_e_acsl__2));
      __gen_e_acsl_and = __gen_e_acsl_le <= 0;
      __gmpz_clear(__gen_e_acsl_);
      __gmpz_clear(__gen_e_acsl__2);
    }
    else __gen_e_acsl_and = 0;
    __e_acsl_assert(__gen_e_acsl_and,"Assertion","main",
                    "alloca_bounds: 0 < sizeof(int) * LEN <= 18446744073709551615",
                    "tests/memory/vla.c",8);
  }
  /*@ assert alloca_bounds: 0 < sizeof(int) * LEN ≤ 18446744073709551615;
   */
  ;
  __lengthof_arr = (unsigned long)LEN;
  int *arr = __builtin_alloca(sizeof(int) * __lengthof_arr);
  __e_acsl_store_block((void *)arr,sizeof(int) * __lengthof_arr);
  __e_acsl_store_block((void *)(& arr),(size_t)8);
  __e_acsl_full_init((void *)(& arr));
  i = 0;
  while (i <= LEN) {
    if (i < LEN) {
      {
        int __gen_e_acsl_valid;
        __gen_e_acsl_valid = __e_acsl_valid((void *)(arr + i),sizeof(int),
                                            (void *)arr,(void *)(& arr));
        __e_acsl_assert(__gen_e_acsl_valid,"Assertion","main",
                        "\\valid(arr + i)","tests/memory/vla.c",12);
      }
      /*@ assert \valid(arr + i); */ ;
    }
    else {
      {
        int __gen_e_acsl_valid_2;
        __gen_e_acsl_valid_2 = __e_acsl_valid((void *)(arr + i),sizeof(int),
                                              (void *)arr,(void *)(& arr));
        __e_acsl_assert(! __gen_e_acsl_valid_2,"Assertion","main",
                        "!\\valid(arr + i)","tests/memory/vla.c",14);
      }
      /*@ assert ¬\valid(arr + i); */ ;
    }
    i ++;
  }
  __retres = 0;
  __e_acsl_delete_block((void *)arr);
  /* __fc_vla_free((void *)arr); */
  __e_acsl_delete_block((void *)(& arr));
  __e_acsl_memory_clean();
  return __retres;
}


