summaryrefslogtreecommitdiff
path: root/tests/src/JIT/Regression/Dev11/dev11_13912/dev11_13912.cs
blob: 24b4fc8692c61ae4fbddb4ba059e7f6a6f95b48f (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//

using System;

public class P
{
    public static int Main()
    {
        // This bug is caused by a broken flowgraph due to a return from
        // a try inside a catch block

        TestCatchReturn();

        // Successfully jitted a return from a try inside a catch block
        return 100;
    }

    public static void TestCatchReturn()
    {
        try
        {
        }
        catch (Exception)
        {
            try
            {
                try
                {
                    return;
                }
                catch
                {
                    return;
                }
                finally
                {
                }
            }
            catch (Exception)
            {
            }
        }
    }
}