overcomp.ttcn 910 Bytes
Newer Older
Elemer Lelik's avatar
Elemer Lelik committed
1
/******************************************************************************
Elemer Lelik's avatar
Elemer Lelik committed
2
 * Copyright (c) 2000-2015 Ericsson Telecom AB
Elemer Lelik's avatar
Elemer Lelik committed
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
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 ******************************************************************************/
module overcomp {
import from types all;

function f(test_int_port p) {
  var integer i := 0;

  // unnecessary
  for (i:=0; false; i:=i+1) {}

  // unnecessary
  while (false) {}

  // unnecessary
  do {} while (false);

  select(i) {
    case else {}
    case(0) {/* never reach */}
  }

  if (true) {
  } else {
    // never reach
  }

  if (false) {
    // never reach
  } else {
  }

  alt {
    [else] {}
    [] p.receive {/* never reach */}

  }
}
}