/* Generated by Frama-C */
#include "stddef.h"
#include "stdio.h"
int main(void)
{
  int __retres;
  int *p;
  __e_acsl_memory_init((int *)0,(char ***)0,(size_t)8);
  __e_acsl_store_block((void *)(& p),(size_t)8);
  {
    int a = 0;
    __e_acsl_store_block((void *)(& a),(size_t)4);
    __e_acsl_full_init((void *)(& a));
    __e_acsl_full_init((void *)(& p));
    p = & a;
    {
      int __gen_e_acsl_initialized;
      int __gen_e_acsl_and;
      __gen_e_acsl_initialized = __e_acsl_initialized((void *)(& p),
                                                      sizeof(int *));
      if (__gen_e_acsl_initialized) {
        int __gen_e_acsl_valid;
        __gen_e_acsl_valid = __e_acsl_valid((void *)p,sizeof(int),(void *)p,
                                            (void *)(& p));
        __gen_e_acsl_and = __gen_e_acsl_valid;
      }
      else __gen_e_acsl_and = 0;
      __e_acsl_assert(__gen_e_acsl_and,"Assertion","main","\\valid(p)",
                      "tests/bts/bts1740.i",11);
    }
    /*@ assert \valid(p); */ ;
    __e_acsl_delete_block((void *)(& a));
    goto L;
    __e_acsl_delete_block((void *)(& a));
  }
  L:
  /*@ assert ¬\valid(p); */
  {
    int __gen_e_acsl_initialized_2;
    int __gen_e_acsl_and_2;
    __gen_e_acsl_initialized_2 = __e_acsl_initialized((void *)(& p),
                                                      sizeof(int *));
    if (__gen_e_acsl_initialized_2) {
      int __gen_e_acsl_valid_2;
      /*@ assert Eva: dangling_pointer: ¬\dangling(&p); */
      __gen_e_acsl_valid_2 = __e_acsl_valid((void *)p,sizeof(int),(void *)p,
                                            (void *)(& p));
      __gen_e_acsl_and_2 = __gen_e_acsl_valid_2;
    }
    else __gen_e_acsl_and_2 = 0;
    __e_acsl_assert(! __gen_e_acsl_and_2,"Assertion","main","!\\valid(p)",
                    "tests/bts/bts1740.i",16);
  }
  __retres = 0;
  __e_acsl_delete_block((void *)(& p));
  __e_acsl_memory_clean();
  return __retres;
}


