File: slice_no_body.c

package info (click to toggle)
frama-c 20140301%2Bneon%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 19,548 kB
  • ctags: 28,183
  • sloc: ml: 181,252; ansic: 13,776; makefile: 2,452; sh: 1,085; lisp: 178
file content (28 lines) | stat: -rw-r--r-- 414 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
/* run.config
   EXECNOW: make -s tests/slicing/slice_no_body.opt
   CMD: tests/slicing/slice_no_body.opt
   OPT: -check -deps -lib-entry -main h -journal-disable
*/

int G;

int f (int a);

int g (int c) {
  int x = c+1;
  int y = c*2;
  if (c == 0)
    return f (x);
  else
    return y;
}

int h (void) {
  int a = f (1);
  int b = f (2);
  int c = f (3);
  G = f (4);
  if (G > 0)
    G = g (c);
  return g;
}