Merge pull request #1861 from saper/home-override
[mono-project.git] / mcs / tests / test-579.cs
blob1f49f63c7650ecb05e0d0e870d1ac32d6b1ffd08
1 // Compiler options: -warnaserror
3 public class TestCase
5 public static int Main ()
7 if (Test1 () != 0)
8 return 1;
10 if (Test2 () != 0)
11 return 2;
13 return 0;
16 static int Test1 ()
18 int i = 0;
20 goto A;
22 i += 3;
25 goto A;
27 i *= 4;
30 if (i != 12)
31 return 1;
33 return 0;
36 static int Test2 ()
38 int i = 0;
40 while (true) {
42 goto A;
44 i += 3;
45 break;
49 if (i != 3)
50 return 1;
52 return 0;
55 static int Test3 ()
57 int i = 0;
59 do {
61 goto A;
63 i += 3;
64 goto X;
66 break;
68 #pragma warning disable 162, 429
69 } while (i > 0);
70 #pragma warning restore 162, 429
72 if (i != 3)
73 return 1;
75 return 0;