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

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

class Repro
{
  private int[] stack = new int[1];
  private int cc;
  public int fc;
  private int sp;

  public static int Main()
  {
    Repro r = new Repro();
    r.foo();
    Console.WriteLine(r.stack[0]);
    return r.stack[0] == 42 ? 0 : 1;
  }

  public void foo()
  {
    fc = cc = bar();
    fc = stack[sp++] = cc;
  }

  private int bar()
  {
    return 42;
  }
}