File: undeclared_local_bts1113.res.oracle

package info (click to toggle)
frama-c 20220511-manganese-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 66,472 kB
  • sloc: ml: 278,832; ansic: 47,093; sh: 4,823; makefile: 3,618; javascript: 2,436; python: 1,919; perl: 897; lisp: 293; xml: 62
file content (60 lines) | stat: -rw-r--r-- 1,485 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
[kernel] Parsing undeclared_local_bts1113.c (with preprocessing)
/* Generated by Frama-C */
/*@ assigns \nothing;
    frees p; */
 __attribute__((__FC_BUILTIN__)) void __fc_vla_free(void *p);

/*@ assigns \result;
    assigns \result \from \nothing;
    allocates \result; */
 __attribute__((__FC_BUILTIN__)) void *__fc_vla_alloc(unsigned int size);

void funk(int rounds)
{
  unsigned int __lengthof_k;
  unsigned int __lengthof_kk;
  int i;
  unsigned int __lengthof_k_long_long_size;
  int k_positive_size[4 - 2];
  /*@
  assert alloca_bounds: 0 < sizeof(int) * (int)(2 * rounds) ≤ 4294967295;
   */
  ;
  __lengthof_k = (unsigned int)(2 * rounds);
  int *k = __fc_vla_alloc(sizeof(int) * __lengthof_k);
  /*@
  assert
  alloca_bounds:
    0 < sizeof(int) * (unsigned int)((int)(2 * rounds)) ≤ 4294967295;
   */
  ;
  __lengthof_kk = (unsigned int)(2 * rounds);
  int *kk = __fc_vla_alloc(sizeof(int) * __lengthof_kk);
  long long j = (long long)(rounds * rounds);
  /*@
  assert alloca_bounds: 0 < sizeof(int) * (long long)(j * 2) ≤ 4294967295;
   */
  ;
  __lengthof_k_long_long_size = (unsigned int)(j * (long long)2);
  int *k_long_long_size =
    __fc_vla_alloc(sizeof(int) * __lengthof_k_long_long_size);
  i = 0;
  while (i < 2 * rounds) {
    *(k + i) = i;
    i ++;
  }
  __fc_vla_free((void *)k_long_long_size);
  __fc_vla_free((void *)kk);
  __fc_vla_free((void *)k);
  return;
}

int main(void)
{
  int __retres;
  funk(17);
  __retres = 0;
  return __retres;
}