[jit] Fix the saving of the 'cfg->ret_var_set' flag when inlining, it was set to...
[mono.git] / mcs / tests / test-829.cs
1 using System;
2
3 struct S2
4 {
5         public float f1;
6 }
7
8 struct S
9 {
10         public S2 s2;
11         public float F;
12 }
13
14 class C
15 {
16         static void Test (bool b, out S s)
17         {
18                 if (b) {
19                         s.s2 = new S2 ();
20                         s.F = 1.0f;
21                 } else {
22                         s.s2.f1 = 2.1f;
23                         s.F = 1.0f;
24                 }
25         }
26
27         static void Test2 (bool b)
28         {
29                 S s;
30                 if (b) {
31                         s.s2 = new S2 ();
32                         s.F = 1.0f;
33                 } else {
34                         s.s2.f1 = 2.1f;
35                         s.F = 1.0f;
36                 }
37         }
38         
39         public static int Main ()
40         {
41                 S s;
42                 Test (true, out s);
43                 Test (false, out s);
44                 return 0;
45         }
46 }