* ResolvedReference.cs (.ctor): Set 'OriginalItemSpec' and 'ResolvedFrom',
[mcs.git] / tests / test-592.cs
blob8ddf88f6c2cd1342fec7e8145e5d0e292f831b7d
1 class T {
2 static int fib (int n) {
3 int f0 = 0, f1 = 1, f2 = 0, i;
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;
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;
31 // This is from System.Text.RegularExpressions.Syntax.Parser::ParseGroup.
32 void foo (int a)
34 bool b = false;
36 while (true) {
37 switch (a) {
38 case 3:
39 break;
42 if (b)
43 goto EndOfGroup;
46 EndOfGroup:
50 // Another case of goto that we did not handle properly
51 static void XXXA () {
52 goto each_logic_expr;
54 int j;
55 bool x = true;
56 try {
58 catch {}
59 int dd;
60 each_logic_expr:
64 static void Main() {}