Welcome to mirror list, hosted at ThFree Co, Russian Federation.

test-140.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 03c9757b16b4e84969ee7ed8e2653f21fd8ef39c (plain)
1
2
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
//
// We used to generate incorrect code for breaks in infinite while loops
//
using System;

public class BreakTest
{
	static int ok = 0;
	
	public static void B ()
	{
		ok++;
                while (true)
                {
			ok++;
                        break;
                }
		ok++;
	}
	
        public static int Main()
        {
		B ();
		if (ok != 3)
			return 1;
		return 0;
        }
}