Merge pull request #4110 from BrzVlad/fix-sgen-win32
[mono.git] / mono / mini / gshared.cs
index 4456aaeb48aa2dbdbfe285762f8f46ff9c0b35a4..65151b07024e8d1a2199d9b76119cd07be48c527 100644 (file)
@@ -1916,6 +1916,31 @@ public class Tests
                                disposable = null;
                        }
                }
+
+       [MethodImplAttribute (MethodImplOptions.NoInlining)]
+       static DateTimeOffset gsharedvt_vphi_inner<T> (T t) {
+               return DateTimeOffset.MinValue;
+       }
+
+       static DateTimeOffset gsharedvt_vphi<T> (T t) {
+               int[] arr = new int [10];
+
+               try {
+                       DateTimeOffset v;
+                       if (arr [0] == 0)
+                               v = gsharedvt_vphi_inner (t);
+                       else
+                               v = gsharedvt_vphi_inner (t);
+                       return v;
+               } catch {
+                       return DateTimeOffset.MinValue;
+               }
+       }
+
+       static int test_0_gsharedvt_vphi_volatile () {
+               gsharedvt_vphi (0);
+               return 0;
+       }
 }
 
 // #13191