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

test-539.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ea0070d7616e4093029fa0aef7dfa6f1ca2f52f0 (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
// Compiler options: -optimize
using System;

class Test
{
	public static int Main ()
	{
		//switching to a constant fixes the problem
		double thisIsCausingTheProblem = 5.0;

		double[,] m1 = new double[4, 4] {
			{ 1.0, 0.0, 0.0, thisIsCausingTheProblem },
			{ 0.0, 1.0, 0.0, thisIsCausingTheProblem },
			{ 0.0, 0.0, 1.0, thisIsCausingTheProblem },
			{ 0.0, 0.0, 0.0, 1.0 }
		};

		var r = m1[0, 3];
		if (r != 5)
			return 1;

		return 0;
	}
}