projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Merge pull request #811 from criteo/16334-ConcurrentBag
[mono.git]
/
mcs
/
tests
/
test-876.cs
1
using System;
2
3
class T
4
{
5
public static int Main ()
6
{
7
Test1 ();
8
Test2 ();
9
Test3 (0, 1);
10
Test4 ();
11
12
switch (1) {
13
case 1:
14
return 0;
15
default:
16
break;
17
}
18
}
19
20
static void Test1 ()
21
{
22
int g = 9;
23
A:
24
switch (g) {
25
case 4:
26
return;
27
case 5:
28
goto A;
29
}
30
31
switch (g) {
32
case 9:
33
break;
34
}
35
36
return;
37
}
38
39
static void Test2 ()
40
{
41
int a,b;
42
int g = 9;
43
if (g > 0) {
44
a = 1;
45
goto X;
46
} else {
47
b = 2;
48
goto Y;
49
}
50
51
X:
52
Console.WriteLine (a);
53
return;
54
Y:
55
Console.WriteLine (b);
56
return;
57
}
58
59
static uint Test3 (int self, uint data)
60
{
61
uint rid;
62
switch (self) {
63
case 0:
64
rid = 2;
65
switch (data & 3) {
66
case 0:
67
goto ret;
68
default:
69
goto exit;
70
}
71
default:
72
goto exit;
73
}
74
ret:
75
return rid;
76
exit:
77
return 0;
78
}
79
80
static void Test4 ()
81
{
82
bool v;
83
try {
84
throw new NotImplementedException ();
85
} catch (System.Exception) {
86
v = false;
87
}
88
89
Console.WriteLine (v);
90
}
91
}