summaryrefslogtreecommitdiff
path: root/tests/src/JIT/Regression/JitBlue/DevDiv_280120/DevDiv_280120.cs
blob: 39888b100d2cd95588d9610c38f892f9ac338617 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

// This test was originally a repro for an assertion regarding incorrect lclVar ref counts due to a bug in the
// decomposition of a long-typed st.lclFld node. The repro requires that a dead store of this type survives until
// decomposition. We must therefore avoid running liveness before decomposition as part of this test, which requires
// skipping SSA (and dependent optimizations). This pass is disabled in the project file by setting JitDoSsa to 0
// before running the test.

struct S
{
    long m_fld;
    int m_a, m_b, m_c, m_d;

    static int Main(string[] args)
    {
        S s;
        s.m_fld = (long)args.Length;
        return 100;
    }
}