summaryrefslogtreecommitdiff
path: root/mcs/tests/test-408.cs
blob: a1649cfd237c31f6b63713d062e349b7f5bedc1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Compiler options: -unsafe

unsafe class T {
	public static int Main () {
		int len = 10;
		int* x = stackalloc int [len];
		for (int i = 0; i < len; i++)
		{
			if (x [i] != 0)
				return i + 1;
		}
		return 0;
	}
}