projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
2007-10-17 Jonathan Pobst <monkey@jpobst.com>
[mono.git]
/
mcs
/
tests
/
verify-5.cs
1
class T {
2
static int fib (int n) {
3
int f0 = 0, f1 = 1, f2 = 0, i;
4
5
if (n <= 1) goto L3;
6
i = 2;
7
L1:
8
if (i <= n) goto L2;
9
return f2;
10
L2:
11
f2 = f0 + f1;
12
f0 = f1;
13
f1 = f2;
14
i++;
15
goto L1;
16
L3:
17
return n;
18
}
19
20
static int xx (int n) {
21
if (n <= 1) goto L3;
22
L1:
23
if (1 <= n) goto L2;
24
return n;
25
L2:
26
goto L1;
27
L3:
28
return n;
29
}
30
31
// This is from System.Text.RegularExpressions.Syntax.Parser::ParseGroup.
32
void foo (int a)
33
{
34
bool b = false;
35
36
while (true) {
37
switch (a) {
38
case 3:
39
break;
40
}
41
42
if (b)
43
goto EndOfGroup;
44
}
45
46
EndOfGroup:
47
;
48
}
49
50
// Another case of goto that we did not handle properly
51
static void XXXA () {
52
goto each_logic_expr;
53
54
int j;
55
bool x = true;
56
try {
57
}
58
catch {}
59
int dd;
60
each_logic_expr:
61
;
62
}
63
64
static void Main() {}
65
}