/* Generated by Frama-C */
#include "stddef.h"
#include "stdio.h"
#include "stdlib.h"
int *A;
int *B;
void f(void)
{
  A = B;
  return;
}

void g(int *C, int *D)
{
  __e_acsl_store_block((void *)(& C),(size_t)8);
  __e_acsl_assert(1,"Assertion","g","\\initialized(&C)",
                  "tests/memory/ptr_init.c",16);
  /*@ assert \initialized(&C); */ ;
  __e_acsl_delete_block((void *)(& C));
  return;
}

void __e_acsl_globals_init(void)
{
  static char __e_acsl_already_run = 0;
  if (! __e_acsl_already_run) {
    __e_acsl_already_run = 1;
    __e_acsl_store_block((void *)(& B),(size_t)8);
    __e_acsl_full_init((void *)(& B));
    __e_acsl_store_block((void *)(& A),(size_t)8);
    __e_acsl_full_init((void *)(& A));
  }
  return;
}

void __e_acsl_globals_clean(void)
{
  __e_acsl_delete_block((void *)(& B));
  __e_acsl_delete_block((void *)(& A));
}

int main(void)
{
  int __retres;
  int *x;
  int *y;
  __e_acsl_memory_init((int *)0,(char ***)0,(size_t)8);
  __e_acsl_globals_init();
  __e_acsl_store_block((void *)(& y),(size_t)8);
  __e_acsl_store_block((void *)(& x),(size_t)8);
  B = (int *)malloc(sizeof(int));
  __e_acsl_full_init((void *)(& y));
  y = (int *)malloc(sizeof(int));
  __e_acsl_full_init((void *)(& x));
  x = y;
  f();
  __e_acsl_assert(1,"Assertion","main","\\initialized(&A)",
                  "tests/memory/ptr_init.c",25);
  /*@ assert \initialized(&A); */ ;
  {
    int __gen_e_acsl_initialized;
    __gen_e_acsl_initialized = __e_acsl_initialized((void *)(& x),
                                                    sizeof(int *));
    __e_acsl_assert(__gen_e_acsl_initialized,"Assertion","main",
                    "\\initialized(&x)","tests/memory/ptr_init.c",26);
  }
  /*@ assert \initialized(&x); */ ;
  g(x,y);
  __retres = 0;
  __e_acsl_delete_block((void *)(& y));
  __e_acsl_delete_block((void *)(& x));
  __e_acsl_globals_clean();
  __e_acsl_memory_clean();
  return __retres;
}


