[kernel] Parsing share/libc/__fc_builtin_for_normalization.i (no preprocessing)
[kernel] Parsing tests/misc/cast_return.c (with preprocessing)
[value] Analyzing a complete application starting at main
[value] Computing initial state
[value] Initial state computed
[value] Values of globals at initialization
  i ∈ [--..--]
  c ∈ [--..--]
[value] computing for function main1 <- main.
        Called from tests/misc/cast_return.c:55.
[value] computing for function f <- main1 <- main.
        Called from tests/misc/cast_return.c:26.
[value] Recording results for f
[value] Done for function f
[value] computing for function g <- main1 <- main.
        Called from tests/misc/cast_return.c:27.
[value] Recording results for g
[value] Done for function g
tests/misc/cast_return.c:27:[kernel] warning: accessing uninitialized left-value:
                  assert \initialized(&tmp_0);
                  (tmp_0 from g())
[value] computing for function h <- main1 <- main.
        Called from tests/misc/cast_return.c:31.
[value] Recording results for h
[value] Done for function h
tests/misc/cast_return.c:31:[kernel] warning: out of bounds write. assert \valid(*p);
tests/misc/cast_return.c:31:[kernel] warning: all target addresses were invalid. This path is assumed to be dead.
[value] Recording results for main1
[value] Done for function main1
[value] computing for function main2 <- main.
        Called from tests/misc/cast_return.c:56.
[value] computing for function fl1 <- main2 <- main.
        Called from tests/misc/cast_return.c:50.
[value] Recording results for fl1
[value] Done for function fl1
tests/misc/cast_return.c:50:[kernel] warning: accessing uninitialized left-value:
                  assert \initialized(&tmp);
                  (tmp from fl1())
tests/misc/cast_return.c:50:[kernel] warning: completely indeterminate value in tmp.
[value] computing for function fl2 <- main2 <- main.
        Called from tests/misc/cast_return.c:51.
[value] Recording results for fl2
[value] Done for function fl2
tests/misc/cast_return.c:51:[kernel] warning: accessing uninitialized left-value:
                  assert \initialized(&tmp_0);
                  (tmp_0 from fl2())
[value] Recording results for main2
[value] Done for function main2
[value] Recording results for main
[value] done for function main
tests/misc/cast_return.c:31:[value] Assertion 'Value,mem_access' got final status invalid.
tests/misc/cast_return.c:50:[value] Assertion 'Value,initialisation' got final status invalid.
[value] ====== VALUES COMPUTED ======
[value] Values at end of function f:
  
[value] Values at end of function fl1:
  v[bits 0 to 7] ∈ {1}
   [bits 8 to 31] ∈ UNINITIALIZED
[value] Values at end of function fl2:
  v ∈ {1.} or UNINITIALIZED
[value] Values at end of function g:
  x ∈ {1} or UNINITIALIZED
[value] Values at end of function h:
  __retres ∈ {1}
[value] Values at end of function main1:
  
[value] Values at end of function main2:
  d1 ∈ UNINITIALIZED
  d2 ∈ {1.}
[value] Values at end of function main:
  
[from] Computing for function f
[from] Done for function f
[from] Computing for function fl1
[from] Done for function fl1
[from] Computing for function fl2
[from] Done for function fl2
[from] Computing for function g
[from] Done for function g
[from] Computing for function h
[from] Done for function h
[from] Computing for function main1
[from] Done for function main1
[from] Computing for function main2
[from] Done for function main2
[from] Computing for function main
[from] Done for function main
[from] ====== DEPENDENCIES COMPUTED ======
       These dependencies hold at termination for the executions that terminate:
[from] Function f:
  \result FROM i
[from] Function fl1:
  \result FROM \nothing
[from] Function fl2:
  \result FROM c
[from] Function g:
  \result FROM c
[from] Function h:
  \result FROM \nothing
[from] Function main1:
  NO EFFECTS
[from] Function main2:
  NO EFFECTS
[from] Function main:
  NO EFFECTS
[from] ====== END OF DEPENDENCIES ======
[inout] Out (internal) for function f:
          \nothing
[inout] Inputs for function f:
          i
[inout] Out (internal) for function fl1:
          v[bits 0 to 7]
[inout] Inputs for function fl1:
          \nothing
[inout] Out (internal) for function fl2:
          v
[inout] Inputs for function fl2:
          c
[inout] Out (internal) for function g:
          x
[inout] Inputs for function g:
          c
[inout] Out (internal) for function h:
          __retres
[inout] Inputs for function h:
          \nothing
[inout] Out (internal) for function main1:
          f_; tmp; v; tmp_0; x; p; tmp_1
[inout] Inputs for function main1:
          i; c
[inout] Out (internal) for function main2:
          d1; d2; tmp; tmp_0
[inout] Inputs for function main2:
          c
[inout] Out (internal) for function main:
          \nothing
[inout] Inputs for function main:
          i; c
/* Generated by Frama-C */
extern int i;

int f(void)
{
  return i;
}

int volatile c;
int g(void)
{
  int x;
  if (c) x = 1;
  return x;
}

char h(void)
{
  char __retres;
  __retres = (char)1;
  return __retres;
}

void main1(void)
{
  if (c) {
    float f_;
    int tmp;
    tmp = f();
    f_ = (float)tmp;
  }
  if (c) {
    long long v;
    int tmp_0;
    tmp_0 = g();
    /*@ assert Value: initialisation: \initialized(&tmp_0); */
    v = (long long)tmp_0;
  }
  if (c) {
    int *x;
    int **p;
    char tmp_1;
    x = (int *)0;
    p = & x;
    { /* sequence */
      tmp_1 = h();
      /*@ assert Value: mem_access: \valid(*p); */
      *(*p) = (int)tmp_1;
    }
  }
  return;
}

float fl1(void)
{
  float v;
  *((char *)(& v)) = (char)1;
  return v;
}

float fl2(void)
{
  float v;
  if (c) v = (float)1;
  return v;
}

void main2(void)
{
  double d1;
  double d2;
  float tmp_0;
  if (c) {
    float tmp;
    { /* sequence */
      tmp = fl1();
      /*@ assert Value: initialisation: \initialized(&tmp); */
      d1 = (double)tmp;
    }
  }
  { /* sequence */
    tmp_0 = fl2();
    /*@ assert Value: initialisation: \initialized(&tmp_0); */
    d2 = (double)tmp_0;
  }
  return;
}

void main(void)
{
  main1();
  main2();
  return;
}


