summaryrefslogtreecommitdiff
path: root/tests/src/JIT/Methodical/explicit/coverage
diff options
context:
space:
mode:
authorPat Gavlin <pagavlin@microsoft.com>2015-12-15 14:28:20 -0800
committerPat Gavlin <pagavlin@microsoft.com>2015-12-15 16:21:34 -0800
commit343ca9efdc632ecba06b5b182b33ce88206a77a2 (patch)
tree4aa079e6d2883431b9abb8ce6cdbd9e53bb79f51 /tests/src/JIT/Methodical/explicit/coverage
parent8338d1100ffa20319aa9e0ad3031ea63ee3b941b (diff)
downloadcoreclr-343ca9efdc632ecba06b5b182b33ce88206a77a2.tar.gz
coreclr-343ca9efdc632ecba06b5b182b33ce88206a77a2.tar.bz2
coreclr-343ca9efdc632ecba06b5b182b33ce88206a77a2.zip
Import additional JIT tests.
These tests were not imported earlier due to missing APIs. In the case of all APIs besides TypedReference, the sources were adjusted to accommodate the differences on .Net Core. In the case of TypedReference, the tests now reference the local mscorlib.
Diffstat (limited to 'tests/src/JIT/Methodical/explicit/coverage')
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/app.config27
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/body_byte.cs1210
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/body_double.cs889
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/body_float.cs889
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/body_int.cs1210
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/body_long.cs1210
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/body_obj.cs819
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/body_safe_byte.cs969
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/body_safe_double.cs714
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/body_safe_float.cs714
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/body_safe_int.cs969
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/body_safe_long.cs969
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/body_safe_obj.cs819
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/body_safe_short.cs969
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/body_safe_val.cs819
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/body_short.cs1210
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/body_val.cs819
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_byte_1.cs77
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_byte_1_d.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_byte_1_r.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_double_1.cs68
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_double_1_d.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_double_1_r.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_float_1.cs68
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_float_1_d.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_float_1_r.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_gc_byte_1.cs71
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_gc_byte_1_d.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_gc_byte_1_r.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_gc_double_1.cs77
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_gc_double_1_d.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_gc_double_1_r.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_gc_float_1.cs80
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_gc_float_1_d.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_gc_float_1_r.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_gc_int_1.cs71
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_gc_int_1_d.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_gc_int_1_r.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_gc_long_1.cs68
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_gc_long_1_d.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_gc_long_1_r.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_gc_obj_1.cs75
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_gc_obj_1_d.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_gc_obj_1_r.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_gc_short_1.cs77
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_gc_short_1_d.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_gc_short_1_r.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_gc_val_1.cs84
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_gc_val_1_d.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_gc_val_1_r.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_int_1.cs77
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_int_1_d.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_int_1_r.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_long_1.cs80
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_long_1_d.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_long_1_r.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_obj_1.cs84
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_obj_1_d.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_obj_1_r.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_short_1.cs71
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_short_1_d.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_short_1_r.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_val_1.cs84
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_val_1_d.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/expl_val_1_r.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_byte_1.cs68
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_byte_1_d.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_byte_1_r.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_double_1.cs67
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_double_1_d.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_double_1_r.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_float_1.cs67
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_float_1_d.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_float_1_r.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_gc_byte_1.cs71
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_gc_byte_1_d.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_gc_byte_1_r.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_gc_double_1.cs76
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_gc_double_1_d.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_gc_double_1_r.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_gc_float_1.cs79
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_gc_float_1_d.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_gc_float_1_r.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_gc_int_1.cs70
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_gc_int_1_d.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_gc_int_1_r.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_gc_long_1.cs67
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_gc_long_1_d.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_gc_long_1_r.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_gc_obj_1.cs75
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_gc_obj_1_d.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_gc_obj_1_r.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_gc_short_1.cs77
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_gc_short_1_d.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_gc_short_1_r.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_gc_val_1.cs84
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_gc_val_1_d.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_gc_val_1_r.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_int_1.cs76
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_int_1_d.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_int_1_r.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_long_1.cs79
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_long_1_d.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_long_1_r.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_obj_1.cs84
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_obj_1_d.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_obj_1_r.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_short_1.cs71
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_short_1_d.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_short_1_r.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_val_1.cs75
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_val_1_d.csproj46
-rw-r--r--tests/src/JIT/Methodical/explicit/coverage/seq_val_1_r.csproj46
113 files changed, 20567 insertions, 0 deletions
diff --git a/tests/src/JIT/Methodical/explicit/coverage/app.config b/tests/src/JIT/Methodical/explicit/coverage/app.config
new file mode 100644
index 0000000000..8077c95440
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/app.config
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <runtime>
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <dependentAssembly>
+ <assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.20.0" newVersion="4.0.20.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Text.Encoding" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.IO" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reflection" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ </assemblyBinding>
+ </runtime>
+</configuration> \ No newline at end of file
diff --git a/tests/src/JIT/Methodical/explicit/coverage/body_byte.cs b/tests/src/JIT/Methodical/explicit/coverage/body_byte.cs
new file mode 100644
index 0000000000..e5d952c71d
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/body_byte.cs
@@ -0,0 +1,1210 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+
+internal class TestApp
+{
+ private static byte test_0_0(byte num, AA init, AA zero)
+ {
+ return init.q;
+ }
+ private static byte test_0_1(byte num, AA init, AA zero)
+ {
+ zero.q = num;
+ return zero.q;
+ }
+ private static byte test_0_2(byte num, AA init, AA zero)
+ {
+ return (byte)(init.q + zero.q);
+ }
+ private static byte test_0_3(byte num, AA init, AA zero)
+ {
+ return (byte)checked(init.q - zero.q);
+ }
+ private static byte test_0_4(byte num, AA init, AA zero)
+ {
+ zero.q += num; return zero.q;
+ }
+ private static byte test_0_5(byte num, AA init, AA zero)
+ {
+ zero.q += init.q; return zero.q;
+ }
+ private static byte test_0_6(byte num, AA init, AA zero)
+ {
+ if (init.q == num)
+ return 100;
+ else
+ return zero.q;
+ }
+ private static byte test_0_7(byte num, AA init, AA zero)
+ {
+ return (byte)(init.q < num + 1 ? 100 : -1);
+ }
+ private static byte test_0_8(byte num, AA init, AA zero)
+ {
+ return (byte)((init.q > zero.q ? 1 : 0) + 99);
+ }
+ private static byte test_0_9(byte num, AA init, AA zero)
+ {
+ return (byte)((init.q ^ zero.q) | num);
+ }
+ private static byte test_0_10(byte num, AA init, AA zero)
+ {
+ zero.q |= init.q;
+ return (byte)(zero.q & num);
+ }
+ private static byte test_0_11(byte num, AA init, AA zero)
+ {
+ return (byte)(init.q >> zero.q);
+ }
+ private static byte test_0_12(byte num, AA init, AA zero)
+ {
+ return AA.a_init[init.q].q;
+ }
+ private static byte test_0_13(byte num, AA init, AA zero)
+ {
+ return AA.aa_init[num - 100, (init.q | 1) - 2, 1 + zero.q].q;
+ }
+ private static byte test_0_14(byte num, AA init, AA zero)
+ {
+ object bb = init.q;
+ return (byte)bb;
+ }
+ private static byte test_0_15(byte num, AA init, AA zero)
+ {
+ double dbl = init.q;
+ return (byte)dbl;
+ }
+ private static byte test_0_16(byte num, AA init, AA zero)
+ {
+ return AA.call_target(init.q);
+ }
+ private static byte test_0_17(byte num, AA init, AA zero)
+ {
+ return AA.call_target_ref(ref init.q);
+ }
+ private static byte test_1_0(byte num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q;
+ }
+ private static byte test_1_1(byte num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q = num;
+ return r_zero.q;
+ }
+ private static byte test_1_2(byte num, ref AA r_init, ref AA r_zero)
+ {
+ return (byte)(r_init.q + r_zero.q);
+ }
+ private static byte test_1_3(byte num, ref AA r_init, ref AA r_zero)
+ {
+ return (byte)checked(r_init.q - r_zero.q);
+ }
+ private static byte test_1_4(byte num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q += num; return r_zero.q;
+ }
+ private static byte test_1_5(byte num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q += r_init.q; return r_zero.q;
+ }
+ private static byte test_1_6(byte num, ref AA r_init, ref AA r_zero)
+ {
+ if (r_init.q == num)
+ return 100;
+ else
+ return r_zero.q;
+ }
+ private static byte test_1_7(byte num, ref AA r_init, ref AA r_zero)
+ {
+ return (byte)(r_init.q < num + 1 ? 100 : -1);
+ }
+ private static byte test_1_8(byte num, ref AA r_init, ref AA r_zero)
+ {
+ return (byte)((r_init.q > r_zero.q ? 1 : 0) + 99);
+ }
+ private static byte test_1_9(byte num, ref AA r_init, ref AA r_zero)
+ {
+ return (byte)((r_init.q ^ r_zero.q) | num);
+ }
+ private static byte test_1_10(byte num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q |= r_init.q;
+ return (byte)(r_zero.q & num);
+ }
+ private static byte test_1_11(byte num, ref AA r_init, ref AA r_zero)
+ {
+ return (byte)(r_init.q >> r_zero.q);
+ }
+ private static byte test_1_12(byte num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.a_init[r_init.q].q;
+ }
+ private static byte test_1_13(byte num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.aa_init[num - 100, (r_init.q | 1) - 2, 1 + r_zero.q].q;
+ }
+ private static byte test_1_14(byte num, ref AA r_init, ref AA r_zero)
+ {
+ object bb = r_init.q;
+ return (byte)bb;
+ }
+ private static byte test_1_15(byte num, ref AA r_init, ref AA r_zero)
+ {
+ double dbl = r_init.q;
+ return (byte)dbl;
+ }
+ private static byte test_1_16(byte num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.call_target(r_init.q);
+ }
+ private static byte test_1_17(byte num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.call_target_ref(ref r_init.q);
+ }
+ private static byte test_2_0(byte num)
+ {
+ return AA.a_init[num].q;
+ }
+ private static byte test_2_1(byte num)
+ {
+ AA.a_zero[num].q = num;
+ return AA.a_zero[num].q;
+ }
+ private static byte test_2_2(byte num)
+ {
+ return (byte)(AA.a_init[num].q + AA.a_zero[num].q);
+ }
+ private static byte test_2_3(byte num)
+ {
+ return (byte)checked(AA.a_init[num].q - AA.a_zero[num].q);
+ }
+ private static byte test_2_4(byte num)
+ {
+ AA.a_zero[num].q += num; return AA.a_zero[num].q;
+ }
+ private static byte test_2_5(byte num)
+ {
+ AA.a_zero[num].q += AA.a_init[num].q; return AA.a_zero[num].q;
+ }
+ private static byte test_2_6(byte num)
+ {
+ if (AA.a_init[num].q == num)
+ return 100;
+ else
+ return AA.a_zero[num].q;
+ }
+ private static byte test_2_7(byte num)
+ {
+ return (byte)(AA.a_init[num].q < num + 1 ? 100 : -1);
+ }
+ private static byte test_2_8(byte num)
+ {
+ return (byte)((AA.a_init[num].q > AA.a_zero[num].q ? 1 : 0) + 99);
+ }
+ private static byte test_2_9(byte num)
+ {
+ return (byte)((AA.a_init[num].q ^ AA.a_zero[num].q) | num);
+ }
+ private static byte test_2_10(byte num)
+ {
+ AA.a_zero[num].q |= AA.a_init[num].q;
+ return (byte)(AA.a_zero[num].q & num);
+ }
+ private static byte test_2_11(byte num)
+ {
+ return (byte)(AA.a_init[num].q >> AA.a_zero[num].q);
+ }
+ private static byte test_2_12(byte num)
+ {
+ return AA.a_init[AA.a_init[num].q].q;
+ }
+ private static byte test_2_13(byte num)
+ {
+ return AA.aa_init[num - 100, (AA.a_init[num].q | 1) - 2, 1 + AA.a_zero[num].q].q;
+ }
+ private static byte test_2_14(byte num)
+ {
+ object bb = AA.a_init[num].q;
+ return (byte)bb;
+ }
+ private static byte test_2_15(byte num)
+ {
+ double dbl = AA.a_init[num].q;
+ return (byte)dbl;
+ }
+ private static byte test_2_16(byte num)
+ {
+ return AA.call_target(AA.a_init[num].q);
+ }
+ private static byte test_2_17(byte num)
+ {
+ return AA.call_target_ref(ref AA.a_init[num].q);
+ }
+ private static byte test_3_0(byte num)
+ {
+ return AA.aa_init[0, num - 1, num / 100].q;
+ }
+ private static byte test_3_1(byte num)
+ {
+ AA.aa_zero[0, num - 1, num / 100].q = num;
+ return AA.aa_zero[0, num - 1, num / 100].q;
+ }
+ private static byte test_3_2(byte num)
+ {
+ return (byte)(AA.aa_init[0, num - 1, num / 100].q + AA.aa_zero[0, num - 1, num / 100].q);
+ }
+ private static byte test_3_3(byte num)
+ {
+ return (byte)checked(AA.aa_init[0, num - 1, num / 100].q - AA.aa_zero[0, num - 1, num / 100].q);
+ }
+ private static byte test_3_4(byte num)
+ {
+ AA.aa_zero[0, num - 1, num / 100].q += num; return AA.aa_zero[0, num - 1, num / 100].q;
+ }
+ private static byte test_3_5(byte num)
+ {
+ AA.aa_zero[0, num - 1, num / 100].q += AA.aa_init[0, num - 1, num / 100].q; return AA.aa_zero[0, num - 1, num / 100].q;
+ }
+ private static byte test_3_6(byte num)
+ {
+ if (AA.aa_init[0, num - 1, num / 100].q == num)
+ return 100;
+ else
+ return AA.aa_zero[0, num - 1, num / 100].q;
+ }
+ private static byte test_3_7(byte num)
+ {
+ return (byte)(AA.aa_init[0, num - 1, num / 100].q < num + 1 ? 100 : -1);
+ }
+ private static byte test_3_8(byte num)
+ {
+ return (byte)((AA.aa_init[0, num - 1, num / 100].q > AA.aa_zero[0, num - 1, num / 100].q ? 1 : 0) + 99);
+ }
+ private static byte test_3_9(byte num)
+ {
+ return (byte)((AA.aa_init[0, num - 1, num / 100].q ^ AA.aa_zero[0, num - 1, num / 100].q) | num);
+ }
+ private static byte test_3_10(byte num)
+ {
+ AA.aa_zero[0, num - 1, num / 100].q |= AA.aa_init[0, num - 1, num / 100].q;
+ return (byte)(AA.aa_zero[0, num - 1, num / 100].q & num);
+ }
+ private static byte test_3_11(byte num)
+ {
+ return (byte)(AA.aa_init[0, num - 1, num / 100].q >> AA.aa_zero[0, num - 1, num / 100].q);
+ }
+ private static byte test_3_12(byte num)
+ {
+ return AA.a_init[AA.aa_init[0, num - 1, num / 100].q].q;
+ }
+ private static byte test_3_13(byte num)
+ {
+ return AA.aa_init[num - 100, (AA.aa_init[0, num - 1, num / 100].q | 1) - 2, 1 + AA.aa_zero[0, num - 1, num / 100].q].q;
+ }
+ private static byte test_3_14(byte num)
+ {
+ object bb = AA.aa_init[0, num - 1, num / 100].q;
+ return (byte)bb;
+ }
+ private static byte test_3_15(byte num)
+ {
+ double dbl = AA.aa_init[0, num - 1, num / 100].q;
+ return (byte)dbl;
+ }
+ private static byte test_3_16(byte num)
+ {
+ return AA.call_target(AA.aa_init[0, num - 1, num / 100].q);
+ }
+ private static byte test_3_17(byte num)
+ {
+ return AA.call_target_ref(ref AA.aa_init[0, num - 1, num / 100].q);
+ }
+ private static byte test_4_0(byte num)
+ {
+ return BB.f_init.q;
+ }
+ private static byte test_4_1(byte num)
+ {
+ BB.f_zero.q = num;
+ return BB.f_zero.q;
+ }
+ private static byte test_4_2(byte num)
+ {
+ return (byte)(BB.f_init.q + BB.f_zero.q);
+ }
+ private static byte test_4_3(byte num)
+ {
+ return (byte)checked(BB.f_init.q - BB.f_zero.q);
+ }
+ private static byte test_4_4(byte num)
+ {
+ BB.f_zero.q += num; return BB.f_zero.q;
+ }
+ private static byte test_4_5(byte num)
+ {
+ BB.f_zero.q += BB.f_init.q; return BB.f_zero.q;
+ }
+ private static byte test_4_6(byte num)
+ {
+ if (BB.f_init.q == num)
+ return 100;
+ else
+ return BB.f_zero.q;
+ }
+ private static byte test_4_7(byte num)
+ {
+ return (byte)(BB.f_init.q < num + 1 ? 100 : -1);
+ }
+ private static byte test_4_8(byte num)
+ {
+ return (byte)((BB.f_init.q > BB.f_zero.q ? 1 : 0) + 99);
+ }
+ private static byte test_4_9(byte num)
+ {
+ return (byte)((BB.f_init.q ^ BB.f_zero.q) | num);
+ }
+ private static byte test_4_10(byte num)
+ {
+ BB.f_zero.q |= BB.f_init.q;
+ return (byte)(BB.f_zero.q & num);
+ }
+ private static byte test_4_11(byte num)
+ {
+ return (byte)(BB.f_init.q >> BB.f_zero.q);
+ }
+ private static byte test_4_12(byte num)
+ {
+ return AA.a_init[BB.f_init.q].q;
+ }
+ private static byte test_4_13(byte num)
+ {
+ return AA.aa_init[num - 100, (BB.f_init.q | 1) - 2, 1 + BB.f_zero.q].q;
+ }
+ private static byte test_4_14(byte num)
+ {
+ object bb = BB.f_init.q;
+ return (byte)bb;
+ }
+ private static byte test_4_15(byte num)
+ {
+ double dbl = BB.f_init.q;
+ return (byte)dbl;
+ }
+ private static byte test_4_16(byte num)
+ {
+ return AA.call_target(BB.f_init.q);
+ }
+ private static byte test_4_17(byte num)
+ {
+ return AA.call_target_ref(ref BB.f_init.q);
+ }
+ private static byte test_5_0(byte num)
+ {
+ return ((AA)AA.b_init).q;
+ }
+ private static byte test_6_0(byte num, TypedReference tr_init)
+ {
+ return __refvalue(tr_init, AA).q;
+ }
+ private static unsafe byte test_7_0(byte num, void* ptr_init, void* ptr_zero)
+ {
+ return (*((AA*)ptr_init)).q;
+ }
+ private static unsafe byte test_7_1(byte num, void* ptr_init, void* ptr_zero)
+ {
+ (*((AA*)ptr_zero)).q = num;
+ return (*((AA*)ptr_zero)).q;
+ }
+ private static unsafe byte test_7_2(byte num, void* ptr_init, void* ptr_zero)
+ {
+ return (byte)((*((AA*)ptr_init)).q + (*((AA*)ptr_zero)).q);
+ }
+ private static unsafe byte test_7_3(byte num, void* ptr_init, void* ptr_zero)
+ {
+ return (byte)checked((*((AA*)ptr_init)).q - (*((AA*)ptr_zero)).q);
+ }
+ private static unsafe byte test_7_4(byte num, void* ptr_init, void* ptr_zero)
+ {
+ (*((AA*)ptr_zero)).q += num; return (*((AA*)ptr_zero)).q;
+ }
+ private static unsafe byte test_7_5(byte num, void* ptr_init, void* ptr_zero)
+ {
+ (*((AA*)ptr_zero)).q += (*((AA*)ptr_init)).q; return (*((AA*)ptr_zero)).q;
+ }
+ private static unsafe byte test_7_6(byte num, void* ptr_init, void* ptr_zero)
+ {
+ if ((*((AA*)ptr_init)).q == num)
+ return 100;
+ else
+ return (*((AA*)ptr_zero)).q;
+ }
+ private static unsafe byte test_7_7(byte num, void* ptr_init, void* ptr_zero)
+ {
+ return (byte)((*((AA*)ptr_init)).q < num + 1 ? 100 : -1);
+ }
+ private static unsafe byte test_7_8(byte num, void* ptr_init, void* ptr_zero)
+ {
+ return (byte)(((*((AA*)ptr_init)).q > (*((AA*)ptr_zero)).q ? 1 : 0) + 99);
+ }
+ private static unsafe byte test_7_9(byte num, void* ptr_init, void* ptr_zero)
+ {
+ return (byte)(((*((AA*)ptr_init)).q ^ (*((AA*)ptr_zero)).q) | num);
+ }
+ private static unsafe byte test_7_10(byte num, void* ptr_init, void* ptr_zero)
+ {
+ (*((AA*)ptr_zero)).q |= (*((AA*)ptr_init)).q;
+ return (byte)((*((AA*)ptr_zero)).q & num);
+ }
+ private static unsafe byte test_7_11(byte num, void* ptr_init, void* ptr_zero)
+ {
+ return (byte)((*((AA*)ptr_init)).q >> (*((AA*)ptr_zero)).q);
+ }
+ private static unsafe byte test_7_12(byte num, void* ptr_init, void* ptr_zero)
+ {
+ return AA.a_init[(*((AA*)ptr_init)).q].q;
+ }
+ private static unsafe byte test_7_13(byte num, void* ptr_init, void* ptr_zero)
+ {
+ return AA.aa_init[num - 100, ((*((AA*)ptr_init)).q | 1) - 2, 1 + (*((AA*)ptr_zero)).q].q;
+ }
+ private static unsafe byte test_7_14(byte num, void* ptr_init, void* ptr_zero)
+ {
+ object bb = (*((AA*)ptr_init)).q;
+ return (byte)bb;
+ }
+ private static unsafe byte test_7_15(byte num, void* ptr_init, void* ptr_zero)
+ {
+ double dbl = (*((AA*)ptr_init)).q;
+ return (byte)dbl;
+ }
+ private static unsafe byte test_7_16(byte num, void* ptr_init, void* ptr_zero)
+ {
+ return AA.call_target((*((AA*)ptr_init)).q);
+ }
+ private static unsafe byte test_7_17(byte num, void* ptr_init, void* ptr_zero)
+ {
+ return AA.call_target_ref(ref (*((AA*)ptr_init)).q);
+ }
+
+ private static unsafe int Main()
+ {
+ AA.reset();
+ if (test_0_0(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_0() failed.");
+ return 101;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_1(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_1() failed.");
+ return 102;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_2(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_2() failed.");
+ return 103;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_3(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_3() failed.");
+ return 104;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_4(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_4() failed.");
+ return 105;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_5(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_5() failed.");
+ return 106;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_6(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_6() failed.");
+ return 107;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_7(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_7() failed.");
+ return 108;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_8(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_8() failed.");
+ return 109;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_9(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_9() failed.");
+ return 110;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_10(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_10() failed.");
+ return 111;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_11(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_11() failed.");
+ return 112;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_12(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_12() failed.");
+ return 113;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_13(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_13() failed.");
+ return 114;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_14(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_14() failed.");
+ return 115;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_15(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_15() failed.");
+ return 116;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_16(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_16() failed.");
+ return 117;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_17(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_17() failed.");
+ return 118;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_0(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_0() failed.");
+ return 119;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_1(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_1() failed.");
+ return 120;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_2(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_2() failed.");
+ return 121;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_3(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_3() failed.");
+ return 122;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_4(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_4() failed.");
+ return 123;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_5(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_5() failed.");
+ return 124;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_6(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_6() failed.");
+ return 125;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_7(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_7() failed.");
+ return 126;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_8(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_8() failed.");
+ return 127;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_9(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_9() failed.");
+ return 128;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_10(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_10() failed.");
+ return 129;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_11(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_11() failed.");
+ return 130;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_12(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_12() failed.");
+ return 131;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_13(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_13() failed.");
+ return 132;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_14(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_14() failed.");
+ return 133;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_15(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_15() failed.");
+ return 134;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_16(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_16() failed.");
+ return 135;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_17(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_17() failed.");
+ return 136;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_0(100) != 100)
+ {
+ Console.WriteLine("test_2_0() failed.");
+ return 137;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_1(100) != 100)
+ {
+ Console.WriteLine("test_2_1() failed.");
+ return 138;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_2(100) != 100)
+ {
+ Console.WriteLine("test_2_2() failed.");
+ return 139;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_3(100) != 100)
+ {
+ Console.WriteLine("test_2_3() failed.");
+ return 140;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_4(100) != 100)
+ {
+ Console.WriteLine("test_2_4() failed.");
+ return 141;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_5(100) != 100)
+ {
+ Console.WriteLine("test_2_5() failed.");
+ return 142;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_6(100) != 100)
+ {
+ Console.WriteLine("test_2_6() failed.");
+ return 143;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_7(100) != 100)
+ {
+ Console.WriteLine("test_2_7() failed.");
+ return 144;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_8(100) != 100)
+ {
+ Console.WriteLine("test_2_8() failed.");
+ return 145;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_9(100) != 100)
+ {
+ Console.WriteLine("test_2_9() failed.");
+ return 146;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_10(100) != 100)
+ {
+ Console.WriteLine("test_2_10() failed.");
+ return 147;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_11(100) != 100)
+ {
+ Console.WriteLine("test_2_11() failed.");
+ return 148;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_12(100) != 100)
+ {
+ Console.WriteLine("test_2_12() failed.");
+ return 149;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_13(100) != 100)
+ {
+ Console.WriteLine("test_2_13() failed.");
+ return 150;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_14(100) != 100)
+ {
+ Console.WriteLine("test_2_14() failed.");
+ return 151;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_15(100) != 100)
+ {
+ Console.WriteLine("test_2_15() failed.");
+ return 152;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_16(100) != 100)
+ {
+ Console.WriteLine("test_2_16() failed.");
+ return 153;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_17(100) != 100)
+ {
+ Console.WriteLine("test_2_17() failed.");
+ return 154;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_0(100) != 100)
+ {
+ Console.WriteLine("test_3_0() failed.");
+ return 155;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_1(100) != 100)
+ {
+ Console.WriteLine("test_3_1() failed.");
+ return 156;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_2(100) != 100)
+ {
+ Console.WriteLine("test_3_2() failed.");
+ return 157;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_3(100) != 100)
+ {
+ Console.WriteLine("test_3_3() failed.");
+ return 158;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_4(100) != 100)
+ {
+ Console.WriteLine("test_3_4() failed.");
+ return 159;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_5(100) != 100)
+ {
+ Console.WriteLine("test_3_5() failed.");
+ return 160;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_6(100) != 100)
+ {
+ Console.WriteLine("test_3_6() failed.");
+ return 161;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_7(100) != 100)
+ {
+ Console.WriteLine("test_3_7() failed.");
+ return 162;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_8(100) != 100)
+ {
+ Console.WriteLine("test_3_8() failed.");
+ return 163;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_9(100) != 100)
+ {
+ Console.WriteLine("test_3_9() failed.");
+ return 164;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_10(100) != 100)
+ {
+ Console.WriteLine("test_3_10() failed.");
+ return 165;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_11(100) != 100)
+ {
+ Console.WriteLine("test_3_11() failed.");
+ return 166;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_12(100) != 100)
+ {
+ Console.WriteLine("test_3_12() failed.");
+ return 167;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_13(100) != 100)
+ {
+ Console.WriteLine("test_3_13() failed.");
+ return 168;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_14(100) != 100)
+ {
+ Console.WriteLine("test_3_14() failed.");
+ return 169;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_15(100) != 100)
+ {
+ Console.WriteLine("test_3_15() failed.");
+ return 170;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_16(100) != 100)
+ {
+ Console.WriteLine("test_3_16() failed.");
+ return 171;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_17(100) != 100)
+ {
+ Console.WriteLine("test_3_17() failed.");
+ return 172;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_0(100) != 100)
+ {
+ Console.WriteLine("test_4_0() failed.");
+ return 173;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_1(100) != 100)
+ {
+ Console.WriteLine("test_4_1() failed.");
+ return 174;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_2(100) != 100)
+ {
+ Console.WriteLine("test_4_2() failed.");
+ return 175;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_3(100) != 100)
+ {
+ Console.WriteLine("test_4_3() failed.");
+ return 176;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_4(100) != 100)
+ {
+ Console.WriteLine("test_4_4() failed.");
+ return 177;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_5(100) != 100)
+ {
+ Console.WriteLine("test_4_5() failed.");
+ return 178;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_6(100) != 100)
+ {
+ Console.WriteLine("test_4_6() failed.");
+ return 179;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_7(100) != 100)
+ {
+ Console.WriteLine("test_4_7() failed.");
+ return 180;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_8(100) != 100)
+ {
+ Console.WriteLine("test_4_8() failed.");
+ return 181;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_9(100) != 100)
+ {
+ Console.WriteLine("test_4_9() failed.");
+ return 182;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_10(100) != 100)
+ {
+ Console.WriteLine("test_4_10() failed.");
+ return 183;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_11(100) != 100)
+ {
+ Console.WriteLine("test_4_11() failed.");
+ return 184;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_12(100) != 100)
+ {
+ Console.WriteLine("test_4_12() failed.");
+ return 185;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_13(100) != 100)
+ {
+ Console.WriteLine("test_4_13() failed.");
+ return 186;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_14(100) != 100)
+ {
+ Console.WriteLine("test_4_14() failed.");
+ return 187;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_15(100) != 100)
+ {
+ Console.WriteLine("test_4_15() failed.");
+ return 188;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_16(100) != 100)
+ {
+ Console.WriteLine("test_4_16() failed.");
+ return 189;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_17(100) != 100)
+ {
+ Console.WriteLine("test_4_17() failed.");
+ return 190;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_5_0(100) != 100)
+ {
+ Console.WriteLine("test_5_0() failed.");
+ return 191;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_6_0(100, __makeref(AA._init)) != 100)
+ {
+ Console.WriteLine("test_6_0() failed.");
+ return 192;
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_0(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_0() failed.");
+ return 193;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_1(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_1() failed.");
+ return 194;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_2(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_2() failed.");
+ return 195;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_3(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_3() failed.");
+ return 196;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_4(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_4() failed.");
+ return 197;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_5(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_5() failed.");
+ return 198;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_6(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_6() failed.");
+ return 199;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_7(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_7() failed.");
+ return 200;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_8(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_8() failed.");
+ return 201;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_9(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_9() failed.");
+ return 202;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_10(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_10() failed.");
+ return 203;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_11(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_11() failed.");
+ return 204;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_12(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_12() failed.");
+ return 205;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_13(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_13() failed.");
+ return 206;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_14(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_14() failed.");
+ return 207;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_15(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_15() failed.");
+ return 208;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_16(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_16() failed.");
+ return 209;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_17(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_17() failed.");
+ return 210;
+ }
+ }
+ AA.verify_all(); Console.WriteLine("All tests passed.");
+ return 100;
+ }
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/body_double.cs b/tests/src/JIT/Methodical/explicit/coverage/body_double.cs
new file mode 100644
index 0000000000..72dc96dcde
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/body_double.cs
@@ -0,0 +1,889 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+
+internal class TestApp
+{
+ private static double test_0_0(double num, AA init, AA zero)
+ {
+ return init.q;
+ }
+ private static double test_0_1(double num, AA init, AA zero)
+ {
+ zero.q = num;
+ return zero.q;
+ }
+ private static double test_0_2(double num, AA init, AA zero)
+ {
+ return init.q + zero.q;
+ }
+ private static double test_0_3(double num, AA init, AA zero)
+ {
+ return checked(init.q - zero.q);
+ }
+ private static double test_0_4(double num, AA init, AA zero)
+ {
+ zero.q += num; return zero.q;
+ }
+ private static double test_0_5(double num, AA init, AA zero)
+ {
+ zero.q += init.q; return zero.q;
+ }
+ private static double test_0_6(double num, AA init, AA zero)
+ {
+ if (init.q == num)
+ return 100;
+ else
+ return zero.q;
+ }
+ private static double test_0_7(double num, AA init, AA zero)
+ {
+ return init.q < num + 1 ? 100 : -1;
+ }
+ private static double test_0_8(double num, AA init, AA zero)
+ {
+ return (init.q > zero.q ? 1 : 0) + 99;
+ }
+ private static double test_0_9(double num, AA init, AA zero)
+ {
+ object bb = init.q;
+ return (double)bb;
+ }
+ private static double test_0_10(double num, AA init, AA zero)
+ {
+ double dbl = init.q;
+ return (double)dbl;
+ }
+ private static double test_0_11(double num, AA init, AA zero)
+ {
+ return AA.call_target(init.q);
+ }
+ private static double test_0_12(double num, AA init, AA zero)
+ {
+ return AA.call_target_ref(ref init.q);
+ }
+ private static double test_1_0(double num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q;
+ }
+ private static double test_1_1(double num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q = num;
+ return r_zero.q;
+ }
+ private static double test_1_2(double num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q + r_zero.q;
+ }
+ private static double test_1_3(double num, ref AA r_init, ref AA r_zero)
+ {
+ return checked(r_init.q - r_zero.q);
+ }
+ private static double test_1_4(double num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q += num; return r_zero.q;
+ }
+ private static double test_1_5(double num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q += r_init.q; return r_zero.q;
+ }
+ private static double test_1_6(double num, ref AA r_init, ref AA r_zero)
+ {
+ if (r_init.q == num)
+ return 100;
+ else
+ return r_zero.q;
+ }
+ private static double test_1_7(double num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q < num + 1 ? 100 : -1;
+ }
+ private static double test_1_8(double num, ref AA r_init, ref AA r_zero)
+ {
+ return (r_init.q > r_zero.q ? 1 : 0) + 99;
+ }
+ private static double test_1_9(double num, ref AA r_init, ref AA r_zero)
+ {
+ object bb = r_init.q;
+ return (double)bb;
+ }
+ private static double test_1_10(double num, ref AA r_init, ref AA r_zero)
+ {
+ double dbl = r_init.q;
+ return (double)dbl;
+ }
+ private static double test_1_11(double num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.call_target(r_init.q);
+ }
+ private static double test_1_12(double num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.call_target_ref(ref r_init.q);
+ }
+ private static double test_2_0(double num)
+ {
+ return AA.a_init[(int)num].q;
+ }
+ private static double test_2_1(double num)
+ {
+ AA.a_zero[(int)num].q = num;
+ return AA.a_zero[(int)num].q;
+ }
+ private static double test_2_2(double num)
+ {
+ return AA.a_init[(int)num].q + AA.a_zero[(int)num].q;
+ }
+ private static double test_2_3(double num)
+ {
+ return checked(AA.a_init[(int)num].q - AA.a_zero[(int)num].q);
+ }
+ private static double test_2_4(double num)
+ {
+ AA.a_zero[(int)num].q += num; return AA.a_zero[(int)num].q;
+ }
+ private static double test_2_5(double num)
+ {
+ AA.a_zero[(int)num].q += AA.a_init[(int)num].q; return AA.a_zero[(int)num].q;
+ }
+ private static double test_2_6(double num)
+ {
+ if (AA.a_init[(int)num].q == num)
+ return 100;
+ else
+ return AA.a_zero[(int)num].q;
+ }
+ private static double test_2_7(double num)
+ {
+ return AA.a_init[(int)num].q < num + 1 ? 100 : -1;
+ }
+ private static double test_2_8(double num)
+ {
+ return (AA.a_init[(int)num].q > AA.a_zero[(int)num].q ? 1 : 0) + 99;
+ }
+ private static double test_2_9(double num)
+ {
+ object bb = AA.a_init[(int)num].q;
+ return (double)bb;
+ }
+ private static double test_2_10(double num)
+ {
+ double dbl = AA.a_init[(int)num].q;
+ return (double)dbl;
+ }
+ private static double test_2_11(double num)
+ {
+ return AA.call_target(AA.a_init[(int)num].q);
+ }
+ private static double test_2_12(double num)
+ {
+ return AA.call_target_ref(ref AA.a_init[(int)num].q);
+ }
+ private static double test_3_0(double num)
+ {
+ return AA.aa_init[0, (int)num - 1, (int)num / 100].q;
+ }
+ private static double test_3_1(double num)
+ {
+ AA.aa_zero[0, (int)num - 1, (int)num / 100].q = num;
+ return AA.aa_zero[0, (int)num - 1, (int)num / 100].q;
+ }
+ private static double test_3_2(double num)
+ {
+ return AA.aa_init[0, (int)num - 1, (int)num / 100].q + AA.aa_zero[0, (int)num - 1, (int)num / 100].q;
+ }
+ private static double test_3_3(double num)
+ {
+ return checked(AA.aa_init[0, (int)num - 1, (int)num / 100].q - AA.aa_zero[0, (int)num - 1, (int)num / 100].q);
+ }
+ private static double test_3_4(double num)
+ {
+ AA.aa_zero[0, (int)num - 1, (int)num / 100].q += num; return AA.aa_zero[0, (int)num - 1, (int)num / 100].q;
+ }
+ private static double test_3_5(double num)
+ {
+ AA.aa_zero[0, (int)num - 1, (int)num / 100].q += AA.aa_init[0, (int)num - 1, (int)num / 100].q; return AA.aa_zero[0, (int)num - 1, (int)num / 100].q;
+ }
+ private static double test_3_6(double num)
+ {
+ if (AA.aa_init[0, (int)num - 1, (int)num / 100].q == num)
+ return 100;
+ else
+ return AA.aa_zero[0, (int)num - 1, (int)num / 100].q;
+ }
+ private static double test_3_7(double num)
+ {
+ return AA.aa_init[0, (int)num - 1, (int)num / 100].q < num + 1 ? 100 : -1;
+ }
+ private static double test_3_8(double num)
+ {
+ return (AA.aa_init[0, (int)num - 1, (int)num / 100].q > AA.aa_zero[0, (int)num - 1, (int)num / 100].q ? 1 : 0) + 99;
+ }
+ private static double test_3_9(double num)
+ {
+ object bb = AA.aa_init[0, (int)num - 1, (int)num / 100].q;
+ return (double)bb;
+ }
+ private static double test_3_10(double num)
+ {
+ double dbl = AA.aa_init[0, (int)num - 1, (int)num / 100].q;
+ return (double)dbl;
+ }
+ private static double test_3_11(double num)
+ {
+ return AA.call_target(AA.aa_init[0, (int)num - 1, (int)num / 100].q);
+ }
+ private static double test_3_12(double num)
+ {
+ return AA.call_target_ref(ref AA.aa_init[0, (int)num - 1, (int)num / 100].q);
+ }
+ private static double test_4_0(double num)
+ {
+ return BB.f_init.q;
+ }
+ private static double test_4_1(double num)
+ {
+ BB.f_zero.q = num;
+ return BB.f_zero.q;
+ }
+ private static double test_4_2(double num)
+ {
+ return BB.f_init.q + BB.f_zero.q;
+ }
+ private static double test_4_3(double num)
+ {
+ return checked(BB.f_init.q - BB.f_zero.q);
+ }
+ private static double test_4_4(double num)
+ {
+ BB.f_zero.q += num; return BB.f_zero.q;
+ }
+ private static double test_4_5(double num)
+ {
+ BB.f_zero.q += BB.f_init.q; return BB.f_zero.q;
+ }
+ private static double test_4_6(double num)
+ {
+ if (BB.f_init.q == num)
+ return 100;
+ else
+ return BB.f_zero.q;
+ }
+ private static double test_4_7(double num)
+ {
+ return BB.f_init.q < num + 1 ? 100 : -1;
+ }
+ private static double test_4_8(double num)
+ {
+ return (BB.f_init.q > BB.f_zero.q ? 1 : 0) + 99;
+ }
+ private static double test_4_9(double num)
+ {
+ object bb = BB.f_init.q;
+ return (double)bb;
+ }
+ private static double test_4_10(double num)
+ {
+ double dbl = BB.f_init.q;
+ return (double)dbl;
+ }
+ private static double test_4_11(double num)
+ {
+ return AA.call_target(BB.f_init.q);
+ }
+ private static double test_4_12(double num)
+ {
+ return AA.call_target_ref(ref BB.f_init.q);
+ }
+ private static double test_5_0(double num)
+ {
+ return ((AA)AA.b_init).q;
+ }
+ private static double test_6_0(double num, TypedReference tr_init)
+ {
+ return __refvalue(tr_init, AA).q;
+ }
+ private static unsafe double test_7_0(double num, void* ptr_init, void* ptr_zero)
+ {
+ return (*((AA*)ptr_init)).q;
+ }
+ private static unsafe double test_7_1(double num, void* ptr_init, void* ptr_zero)
+ {
+ (*((AA*)ptr_zero)).q = num;
+ return (*((AA*)ptr_zero)).q;
+ }
+ private static unsafe double test_7_2(double num, void* ptr_init, void* ptr_zero)
+ {
+ return (*((AA*)ptr_init)).q + (*((AA*)ptr_zero)).q;
+ }
+ private static unsafe double test_7_3(double num, void* ptr_init, void* ptr_zero)
+ {
+ return checked((*((AA*)ptr_init)).q - (*((AA*)ptr_zero)).q);
+ }
+ private static unsafe double test_7_4(double num, void* ptr_init, void* ptr_zero)
+ {
+ (*((AA*)ptr_zero)).q += num; return (*((AA*)ptr_zero)).q;
+ }
+ private static unsafe double test_7_5(double num, void* ptr_init, void* ptr_zero)
+ {
+ (*((AA*)ptr_zero)).q += (*((AA*)ptr_init)).q; return (*((AA*)ptr_zero)).q;
+ }
+ private static unsafe double test_7_6(double num, void* ptr_init, void* ptr_zero)
+ {
+ if ((*((AA*)ptr_init)).q == num)
+ return 100;
+ else
+ return (*((AA*)ptr_zero)).q;
+ }
+ private static unsafe double test_7_7(double num, void* ptr_init, void* ptr_zero)
+ {
+ return (*((AA*)ptr_init)).q < num + 1 ? 100 : -1;
+ }
+ private static unsafe double test_7_8(double num, void* ptr_init, void* ptr_zero)
+ {
+ return ((*((AA*)ptr_init)).q > (*((AA*)ptr_zero)).q ? 1 : 0) + 99;
+ }
+ private static unsafe double test_7_9(double num, void* ptr_init, void* ptr_zero)
+ {
+ object bb = (*((AA*)ptr_init)).q;
+ return (double)bb;
+ }
+ private static unsafe double test_7_10(double num, void* ptr_init, void* ptr_zero)
+ {
+ double dbl = (*((AA*)ptr_init)).q;
+ return (double)dbl;
+ }
+ private static unsafe double test_7_11(double num, void* ptr_init, void* ptr_zero)
+ {
+ return AA.call_target((*((AA*)ptr_init)).q);
+ }
+ private static unsafe double test_7_12(double num, void* ptr_init, void* ptr_zero)
+ {
+ return AA.call_target_ref(ref (*((AA*)ptr_init)).q);
+ }
+
+ private static unsafe int Main()
+ {
+ AA.reset();
+ if (test_0_0(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_0() failed.");
+ return 101;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_1(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_1() failed.");
+ return 102;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_2(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_2() failed.");
+ return 103;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_3(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_3() failed.");
+ return 104;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_4(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_4() failed.");
+ return 105;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_5(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_5() failed.");
+ return 106;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_6(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_6() failed.");
+ return 107;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_7(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_7() failed.");
+ return 108;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_8(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_8() failed.");
+ return 109;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_9(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_9() failed.");
+ return 110;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_10(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_10() failed.");
+ return 111;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_11(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_11() failed.");
+ return 112;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_12(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_12() failed.");
+ return 113;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_0(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_0() failed.");
+ return 114;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_1(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_1() failed.");
+ return 115;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_2(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_2() failed.");
+ return 116;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_3(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_3() failed.");
+ return 117;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_4(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_4() failed.");
+ return 118;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_5(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_5() failed.");
+ return 119;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_6(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_6() failed.");
+ return 120;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_7(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_7() failed.");
+ return 121;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_8(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_8() failed.");
+ return 122;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_9(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_9() failed.");
+ return 123;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_10(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_10() failed.");
+ return 124;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_11(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_11() failed.");
+ return 125;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_12(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_12() failed.");
+ return 126;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_0(100) != 100)
+ {
+ Console.WriteLine("test_2_0() failed.");
+ return 127;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_1(100) != 100)
+ {
+ Console.WriteLine("test_2_1() failed.");
+ return 128;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_2(100) != 100)
+ {
+ Console.WriteLine("test_2_2() failed.");
+ return 129;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_3(100) != 100)
+ {
+ Console.WriteLine("test_2_3() failed.");
+ return 130;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_4(100) != 100)
+ {
+ Console.WriteLine("test_2_4() failed.");
+ return 131;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_5(100) != 100)
+ {
+ Console.WriteLine("test_2_5() failed.");
+ return 132;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_6(100) != 100)
+ {
+ Console.WriteLine("test_2_6() failed.");
+ return 133;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_7(100) != 100)
+ {
+ Console.WriteLine("test_2_7() failed.");
+ return 134;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_8(100) != 100)
+ {
+ Console.WriteLine("test_2_8() failed.");
+ return 135;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_9(100) != 100)
+ {
+ Console.WriteLine("test_2_9() failed.");
+ return 136;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_10(100) != 100)
+ {
+ Console.WriteLine("test_2_10() failed.");
+ return 137;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_11(100) != 100)
+ {
+ Console.WriteLine("test_2_11() failed.");
+ return 138;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_12(100) != 100)
+ {
+ Console.WriteLine("test_2_12() failed.");
+ return 139;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_0(100) != 100)
+ {
+ Console.WriteLine("test_3_0() failed.");
+ return 140;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_1(100) != 100)
+ {
+ Console.WriteLine("test_3_1() failed.");
+ return 141;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_2(100) != 100)
+ {
+ Console.WriteLine("test_3_2() failed.");
+ return 142;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_3(100) != 100)
+ {
+ Console.WriteLine("test_3_3() failed.");
+ return 143;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_4(100) != 100)
+ {
+ Console.WriteLine("test_3_4() failed.");
+ return 144;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_5(100) != 100)
+ {
+ Console.WriteLine("test_3_5() failed.");
+ return 145;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_6(100) != 100)
+ {
+ Console.WriteLine("test_3_6() failed.");
+ return 146;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_7(100) != 100)
+ {
+ Console.WriteLine("test_3_7() failed.");
+ return 147;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_8(100) != 100)
+ {
+ Console.WriteLine("test_3_8() failed.");
+ return 148;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_9(100) != 100)
+ {
+ Console.WriteLine("test_3_9() failed.");
+ return 149;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_10(100) != 100)
+ {
+ Console.WriteLine("test_3_10() failed.");
+ return 150;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_11(100) != 100)
+ {
+ Console.WriteLine("test_3_11() failed.");
+ return 151;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_12(100) != 100)
+ {
+ Console.WriteLine("test_3_12() failed.");
+ return 152;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_0(100) != 100)
+ {
+ Console.WriteLine("test_4_0() failed.");
+ return 153;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_1(100) != 100)
+ {
+ Console.WriteLine("test_4_1() failed.");
+ return 154;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_2(100) != 100)
+ {
+ Console.WriteLine("test_4_2() failed.");
+ return 155;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_3(100) != 100)
+ {
+ Console.WriteLine("test_4_3() failed.");
+ return 156;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_4(100) != 100)
+ {
+ Console.WriteLine("test_4_4() failed.");
+ return 157;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_5(100) != 100)
+ {
+ Console.WriteLine("test_4_5() failed.");
+ return 158;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_6(100) != 100)
+ {
+ Console.WriteLine("test_4_6() failed.");
+ return 159;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_7(100) != 100)
+ {
+ Console.WriteLine("test_4_7() failed.");
+ return 160;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_8(100) != 100)
+ {
+ Console.WriteLine("test_4_8() failed.");
+ return 161;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_9(100) != 100)
+ {
+ Console.WriteLine("test_4_9() failed.");
+ return 162;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_10(100) != 100)
+ {
+ Console.WriteLine("test_4_10() failed.");
+ return 163;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_11(100) != 100)
+ {
+ Console.WriteLine("test_4_11() failed.");
+ return 164;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_12(100) != 100)
+ {
+ Console.WriteLine("test_4_12() failed.");
+ return 165;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_5_0(100) != 100)
+ {
+ Console.WriteLine("test_5_0() failed.");
+ return 166;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_6_0(100, __makeref(AA._init)) != 100)
+ {
+ Console.WriteLine("test_6_0() failed.");
+ return 167;
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_0(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_0() failed.");
+ return 168;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_1(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_1() failed.");
+ return 169;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_2(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_2() failed.");
+ return 170;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_3(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_3() failed.");
+ return 171;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_4(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_4() failed.");
+ return 172;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_5(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_5() failed.");
+ return 173;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_6(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_6() failed.");
+ return 174;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_7(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_7() failed.");
+ return 175;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_8(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_8() failed.");
+ return 176;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_9(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_9() failed.");
+ return 177;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_10(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_10() failed.");
+ return 178;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_11(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_11() failed.");
+ return 179;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_12(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_12() failed.");
+ return 180;
+ }
+ }
+ AA.verify_all(); Console.WriteLine("All tests passed.");
+ return 100;
+ }
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/body_float.cs b/tests/src/JIT/Methodical/explicit/coverage/body_float.cs
new file mode 100644
index 0000000000..cb7124a609
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/body_float.cs
@@ -0,0 +1,889 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+
+internal class TestApp
+{
+ private static float test_0_0(float num, AA init, AA zero)
+ {
+ return init.q;
+ }
+ private static float test_0_1(float num, AA init, AA zero)
+ {
+ zero.q = num;
+ return zero.q;
+ }
+ private static float test_0_2(float num, AA init, AA zero)
+ {
+ return init.q + zero.q;
+ }
+ private static float test_0_3(float num, AA init, AA zero)
+ {
+ return checked(init.q - zero.q);
+ }
+ private static float test_0_4(float num, AA init, AA zero)
+ {
+ zero.q += num; return zero.q;
+ }
+ private static float test_0_5(float num, AA init, AA zero)
+ {
+ zero.q += init.q; return zero.q;
+ }
+ private static float test_0_6(float num, AA init, AA zero)
+ {
+ if (init.q == num)
+ return 100;
+ else
+ return zero.q;
+ }
+ private static float test_0_7(float num, AA init, AA zero)
+ {
+ return init.q < num + 1 ? 100 : -1;
+ }
+ private static float test_0_8(float num, AA init, AA zero)
+ {
+ return (init.q > zero.q ? 1 : 0) + 99;
+ }
+ private static float test_0_9(float num, AA init, AA zero)
+ {
+ object bb = init.q;
+ return (float)bb;
+ }
+ private static float test_0_10(float num, AA init, AA zero)
+ {
+ double dbl = init.q;
+ return (float)dbl;
+ }
+ private static float test_0_11(float num, AA init, AA zero)
+ {
+ return AA.call_target(init.q);
+ }
+ private static float test_0_12(float num, AA init, AA zero)
+ {
+ return AA.call_target_ref(ref init.q);
+ }
+ private static float test_1_0(float num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q;
+ }
+ private static float test_1_1(float num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q = num;
+ return r_zero.q;
+ }
+ private static float test_1_2(float num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q + r_zero.q;
+ }
+ private static float test_1_3(float num, ref AA r_init, ref AA r_zero)
+ {
+ return checked(r_init.q - r_zero.q);
+ }
+ private static float test_1_4(float num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q += num; return r_zero.q;
+ }
+ private static float test_1_5(float num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q += r_init.q; return r_zero.q;
+ }
+ private static float test_1_6(float num, ref AA r_init, ref AA r_zero)
+ {
+ if (r_init.q == num)
+ return 100;
+ else
+ return r_zero.q;
+ }
+ private static float test_1_7(float num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q < num + 1 ? 100 : -1;
+ }
+ private static float test_1_8(float num, ref AA r_init, ref AA r_zero)
+ {
+ return (r_init.q > r_zero.q ? 1 : 0) + 99;
+ }
+ private static float test_1_9(float num, ref AA r_init, ref AA r_zero)
+ {
+ object bb = r_init.q;
+ return (float)bb;
+ }
+ private static float test_1_10(float num, ref AA r_init, ref AA r_zero)
+ {
+ double dbl = r_init.q;
+ return (float)dbl;
+ }
+ private static float test_1_11(float num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.call_target(r_init.q);
+ }
+ private static float test_1_12(float num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.call_target_ref(ref r_init.q);
+ }
+ private static float test_2_0(float num)
+ {
+ return AA.a_init[(int)num].q;
+ }
+ private static float test_2_1(float num)
+ {
+ AA.a_zero[(int)num].q = num;
+ return AA.a_zero[(int)num].q;
+ }
+ private static float test_2_2(float num)
+ {
+ return AA.a_init[(int)num].q + AA.a_zero[(int)num].q;
+ }
+ private static float test_2_3(float num)
+ {
+ return checked(AA.a_init[(int)num].q - AA.a_zero[(int)num].q);
+ }
+ private static float test_2_4(float num)
+ {
+ AA.a_zero[(int)num].q += num; return AA.a_zero[(int)num].q;
+ }
+ private static float test_2_5(float num)
+ {
+ AA.a_zero[(int)num].q += AA.a_init[(int)num].q; return AA.a_zero[(int)num].q;
+ }
+ private static float test_2_6(float num)
+ {
+ if (AA.a_init[(int)num].q == num)
+ return 100;
+ else
+ return AA.a_zero[(int)num].q;
+ }
+ private static float test_2_7(float num)
+ {
+ return AA.a_init[(int)num].q < num + 1 ? 100 : -1;
+ }
+ private static float test_2_8(float num)
+ {
+ return (AA.a_init[(int)num].q > AA.a_zero[(int)num].q ? 1 : 0) + 99;
+ }
+ private static float test_2_9(float num)
+ {
+ object bb = AA.a_init[(int)num].q;
+ return (float)bb;
+ }
+ private static float test_2_10(float num)
+ {
+ double dbl = AA.a_init[(int)num].q;
+ return (float)dbl;
+ }
+ private static float test_2_11(float num)
+ {
+ return AA.call_target(AA.a_init[(int)num].q);
+ }
+ private static float test_2_12(float num)
+ {
+ return AA.call_target_ref(ref AA.a_init[(int)num].q);
+ }
+ private static float test_3_0(float num)
+ {
+ return AA.aa_init[0, (int)num - 1, (int)num / 100].q;
+ }
+ private static float test_3_1(float num)
+ {
+ AA.aa_zero[0, (int)num - 1, (int)num / 100].q = num;
+ return AA.aa_zero[0, (int)num - 1, (int)num / 100].q;
+ }
+ private static float test_3_2(float num)
+ {
+ return AA.aa_init[0, (int)num - 1, (int)num / 100].q + AA.aa_zero[0, (int)num - 1, (int)num / 100].q;
+ }
+ private static float test_3_3(float num)
+ {
+ return checked(AA.aa_init[0, (int)num - 1, (int)num / 100].q - AA.aa_zero[0, (int)num - 1, (int)num / 100].q);
+ }
+ private static float test_3_4(float num)
+ {
+ AA.aa_zero[0, (int)num - 1, (int)num / 100].q += num; return AA.aa_zero[0, (int)num - 1, (int)num / 100].q;
+ }
+ private static float test_3_5(float num)
+ {
+ AA.aa_zero[0, (int)num - 1, (int)num / 100].q += AA.aa_init[0, (int)num - 1, (int)num / 100].q; return AA.aa_zero[0, (int)num - 1, (int)num / 100].q;
+ }
+ private static float test_3_6(float num)
+ {
+ if (AA.aa_init[0, (int)num - 1, (int)num / 100].q == num)
+ return 100;
+ else
+ return AA.aa_zero[0, (int)num - 1, (int)num / 100].q;
+ }
+ private static float test_3_7(float num)
+ {
+ return AA.aa_init[0, (int)num - 1, (int)num / 100].q < num + 1 ? 100 : -1;
+ }
+ private static float test_3_8(float num)
+ {
+ return (AA.aa_init[0, (int)num - 1, (int)num / 100].q > AA.aa_zero[0, (int)num - 1, (int)num / 100].q ? 1 : 0) + 99;
+ }
+ private static float test_3_9(float num)
+ {
+ object bb = AA.aa_init[0, (int)num - 1, (int)num / 100].q;
+ return (float)bb;
+ }
+ private static float test_3_10(float num)
+ {
+ double dbl = AA.aa_init[0, (int)num - 1, (int)num / 100].q;
+ return (float)dbl;
+ }
+ private static float test_3_11(float num)
+ {
+ return AA.call_target(AA.aa_init[0, (int)num - 1, (int)num / 100].q);
+ }
+ private static float test_3_12(float num)
+ {
+ return AA.call_target_ref(ref AA.aa_init[0, (int)num - 1, (int)num / 100].q);
+ }
+ private static float test_4_0(float num)
+ {
+ return BB.f_init.q;
+ }
+ private static float test_4_1(float num)
+ {
+ BB.f_zero.q = num;
+ return BB.f_zero.q;
+ }
+ private static float test_4_2(float num)
+ {
+ return BB.f_init.q + BB.f_zero.q;
+ }
+ private static float test_4_3(float num)
+ {
+ return checked(BB.f_init.q - BB.f_zero.q);
+ }
+ private static float test_4_4(float num)
+ {
+ BB.f_zero.q += num; return BB.f_zero.q;
+ }
+ private static float test_4_5(float num)
+ {
+ BB.f_zero.q += BB.f_init.q; return BB.f_zero.q;
+ }
+ private static float test_4_6(float num)
+ {
+ if (BB.f_init.q == num)
+ return 100;
+ else
+ return BB.f_zero.q;
+ }
+ private static float test_4_7(float num)
+ {
+ return BB.f_init.q < num + 1 ? 100 : -1;
+ }
+ private static float test_4_8(float num)
+ {
+ return (BB.f_init.q > BB.f_zero.q ? 1 : 0) + 99;
+ }
+ private static float test_4_9(float num)
+ {
+ object bb = BB.f_init.q;
+ return (float)bb;
+ }
+ private static float test_4_10(float num)
+ {
+ double dbl = BB.f_init.q;
+ return (float)dbl;
+ }
+ private static float test_4_11(float num)
+ {
+ return AA.call_target(BB.f_init.q);
+ }
+ private static float test_4_12(float num)
+ {
+ return AA.call_target_ref(ref BB.f_init.q);
+ }
+ private static float test_5_0(float num)
+ {
+ return ((AA)AA.b_init).q;
+ }
+ private static float test_6_0(float num, TypedReference tr_init)
+ {
+ return __refvalue(tr_init, AA).q;
+ }
+ private static unsafe float test_7_0(float num, void* ptr_init, void* ptr_zero)
+ {
+ return (*((AA*)ptr_init)).q;
+ }
+ private static unsafe float test_7_1(float num, void* ptr_init, void* ptr_zero)
+ {
+ (*((AA*)ptr_zero)).q = num;
+ return (*((AA*)ptr_zero)).q;
+ }
+ private static unsafe float test_7_2(float num, void* ptr_init, void* ptr_zero)
+ {
+ return (*((AA*)ptr_init)).q + (*((AA*)ptr_zero)).q;
+ }
+ private static unsafe float test_7_3(float num, void* ptr_init, void* ptr_zero)
+ {
+ return checked((*((AA*)ptr_init)).q - (*((AA*)ptr_zero)).q);
+ }
+ private static unsafe float test_7_4(float num, void* ptr_init, void* ptr_zero)
+ {
+ (*((AA*)ptr_zero)).q += num; return (*((AA*)ptr_zero)).q;
+ }
+ private static unsafe float test_7_5(float num, void* ptr_init, void* ptr_zero)
+ {
+ (*((AA*)ptr_zero)).q += (*((AA*)ptr_init)).q; return (*((AA*)ptr_zero)).q;
+ }
+ private static unsafe float test_7_6(float num, void* ptr_init, void* ptr_zero)
+ {
+ if ((*((AA*)ptr_init)).q == num)
+ return 100;
+ else
+ return (*((AA*)ptr_zero)).q;
+ }
+ private static unsafe float test_7_7(float num, void* ptr_init, void* ptr_zero)
+ {
+ return (*((AA*)ptr_init)).q < num + 1 ? 100 : -1;
+ }
+ private static unsafe float test_7_8(float num, void* ptr_init, void* ptr_zero)
+ {
+ return ((*((AA*)ptr_init)).q > (*((AA*)ptr_zero)).q ? 1 : 0) + 99;
+ }
+ private static unsafe float test_7_9(float num, void* ptr_init, void* ptr_zero)
+ {
+ object bb = (*((AA*)ptr_init)).q;
+ return (float)bb;
+ }
+ private static unsafe float test_7_10(float num, void* ptr_init, void* ptr_zero)
+ {
+ double dbl = (*((AA*)ptr_init)).q;
+ return (float)dbl;
+ }
+ private static unsafe float test_7_11(float num, void* ptr_init, void* ptr_zero)
+ {
+ return AA.call_target((*((AA*)ptr_init)).q);
+ }
+ private static unsafe float test_7_12(float num, void* ptr_init, void* ptr_zero)
+ {
+ return AA.call_target_ref(ref (*((AA*)ptr_init)).q);
+ }
+
+ private static unsafe int Main()
+ {
+ AA.reset();
+ if (test_0_0(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_0() failed.");
+ return 101;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_1(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_1() failed.");
+ return 102;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_2(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_2() failed.");
+ return 103;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_3(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_3() failed.");
+ return 104;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_4(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_4() failed.");
+ return 105;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_5(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_5() failed.");
+ return 106;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_6(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_6() failed.");
+ return 107;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_7(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_7() failed.");
+ return 108;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_8(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_8() failed.");
+ return 109;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_9(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_9() failed.");
+ return 110;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_10(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_10() failed.");
+ return 111;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_11(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_11() failed.");
+ return 112;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_12(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_12() failed.");
+ return 113;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_0(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_0() failed.");
+ return 114;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_1(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_1() failed.");
+ return 115;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_2(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_2() failed.");
+ return 116;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_3(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_3() failed.");
+ return 117;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_4(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_4() failed.");
+ return 118;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_5(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_5() failed.");
+ return 119;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_6(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_6() failed.");
+ return 120;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_7(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_7() failed.");
+ return 121;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_8(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_8() failed.");
+ return 122;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_9(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_9() failed.");
+ return 123;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_10(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_10() failed.");
+ return 124;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_11(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_11() failed.");
+ return 125;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_12(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_12() failed.");
+ return 126;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_0(100) != 100)
+ {
+ Console.WriteLine("test_2_0() failed.");
+ return 127;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_1(100) != 100)
+ {
+ Console.WriteLine("test_2_1() failed.");
+ return 128;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_2(100) != 100)
+ {
+ Console.WriteLine("test_2_2() failed.");
+ return 129;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_3(100) != 100)
+ {
+ Console.WriteLine("test_2_3() failed.");
+ return 130;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_4(100) != 100)
+ {
+ Console.WriteLine("test_2_4() failed.");
+ return 131;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_5(100) != 100)
+ {
+ Console.WriteLine("test_2_5() failed.");
+ return 132;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_6(100) != 100)
+ {
+ Console.WriteLine("test_2_6() failed.");
+ return 133;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_7(100) != 100)
+ {
+ Console.WriteLine("test_2_7() failed.");
+ return 134;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_8(100) != 100)
+ {
+ Console.WriteLine("test_2_8() failed.");
+ return 135;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_9(100) != 100)
+ {
+ Console.WriteLine("test_2_9() failed.");
+ return 136;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_10(100) != 100)
+ {
+ Console.WriteLine("test_2_10() failed.");
+ return 137;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_11(100) != 100)
+ {
+ Console.WriteLine("test_2_11() failed.");
+ return 138;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_12(100) != 100)
+ {
+ Console.WriteLine("test_2_12() failed.");
+ return 139;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_0(100) != 100)
+ {
+ Console.WriteLine("test_3_0() failed.");
+ return 140;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_1(100) != 100)
+ {
+ Console.WriteLine("test_3_1() failed.");
+ return 141;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_2(100) != 100)
+ {
+ Console.WriteLine("test_3_2() failed.");
+ return 142;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_3(100) != 100)
+ {
+ Console.WriteLine("test_3_3() failed.");
+ return 143;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_4(100) != 100)
+ {
+ Console.WriteLine("test_3_4() failed.");
+ return 144;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_5(100) != 100)
+ {
+ Console.WriteLine("test_3_5() failed.");
+ return 145;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_6(100) != 100)
+ {
+ Console.WriteLine("test_3_6() failed.");
+ return 146;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_7(100) != 100)
+ {
+ Console.WriteLine("test_3_7() failed.");
+ return 147;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_8(100) != 100)
+ {
+ Console.WriteLine("test_3_8() failed.");
+ return 148;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_9(100) != 100)
+ {
+ Console.WriteLine("test_3_9() failed.");
+ return 149;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_10(100) != 100)
+ {
+ Console.WriteLine("test_3_10() failed.");
+ return 150;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_11(100) != 100)
+ {
+ Console.WriteLine("test_3_11() failed.");
+ return 151;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_12(100) != 100)
+ {
+ Console.WriteLine("test_3_12() failed.");
+ return 152;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_0(100) != 100)
+ {
+ Console.WriteLine("test_4_0() failed.");
+ return 153;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_1(100) != 100)
+ {
+ Console.WriteLine("test_4_1() failed.");
+ return 154;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_2(100) != 100)
+ {
+ Console.WriteLine("test_4_2() failed.");
+ return 155;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_3(100) != 100)
+ {
+ Console.WriteLine("test_4_3() failed.");
+ return 156;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_4(100) != 100)
+ {
+ Console.WriteLine("test_4_4() failed.");
+ return 157;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_5(100) != 100)
+ {
+ Console.WriteLine("test_4_5() failed.");
+ return 158;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_6(100) != 100)
+ {
+ Console.WriteLine("test_4_6() failed.");
+ return 159;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_7(100) != 100)
+ {
+ Console.WriteLine("test_4_7() failed.");
+ return 160;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_8(100) != 100)
+ {
+ Console.WriteLine("test_4_8() failed.");
+ return 161;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_9(100) != 100)
+ {
+ Console.WriteLine("test_4_9() failed.");
+ return 162;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_10(100) != 100)
+ {
+ Console.WriteLine("test_4_10() failed.");
+ return 163;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_11(100) != 100)
+ {
+ Console.WriteLine("test_4_11() failed.");
+ return 164;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_12(100) != 100)
+ {
+ Console.WriteLine("test_4_12() failed.");
+ return 165;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_5_0(100) != 100)
+ {
+ Console.WriteLine("test_5_0() failed.");
+ return 166;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_6_0(100, __makeref(AA._init)) != 100)
+ {
+ Console.WriteLine("test_6_0() failed.");
+ return 167;
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_0(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_0() failed.");
+ return 168;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_1(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_1() failed.");
+ return 169;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_2(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_2() failed.");
+ return 170;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_3(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_3() failed.");
+ return 171;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_4(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_4() failed.");
+ return 172;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_5(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_5() failed.");
+ return 173;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_6(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_6() failed.");
+ return 174;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_7(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_7() failed.");
+ return 175;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_8(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_8() failed.");
+ return 176;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_9(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_9() failed.");
+ return 177;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_10(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_10() failed.");
+ return 178;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_11(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_11() failed.");
+ return 179;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_12(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_12() failed.");
+ return 180;
+ }
+ }
+ AA.verify_all(); Console.WriteLine("All tests passed.");
+ return 100;
+ }
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/body_int.cs b/tests/src/JIT/Methodical/explicit/coverage/body_int.cs
new file mode 100644
index 0000000000..bd138a9a52
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/body_int.cs
@@ -0,0 +1,1210 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+
+internal class TestApp
+{
+ private static int test_0_0(int num, AA init, AA zero)
+ {
+ return init.q;
+ }
+ private static int test_0_1(int num, AA init, AA zero)
+ {
+ zero.q = num;
+ return zero.q;
+ }
+ private static int test_0_2(int num, AA init, AA zero)
+ {
+ return init.q + zero.q;
+ }
+ private static int test_0_3(int num, AA init, AA zero)
+ {
+ return checked(init.q - zero.q);
+ }
+ private static int test_0_4(int num, AA init, AA zero)
+ {
+ zero.q += num; return zero.q;
+ }
+ private static int test_0_5(int num, AA init, AA zero)
+ {
+ zero.q += init.q; return zero.q;
+ }
+ private static int test_0_6(int num, AA init, AA zero)
+ {
+ if (init.q == num)
+ return 100;
+ else
+ return zero.q;
+ }
+ private static int test_0_7(int num, AA init, AA zero)
+ {
+ return init.q < num + 1 ? 100 : -1;
+ }
+ private static int test_0_8(int num, AA init, AA zero)
+ {
+ return (init.q > zero.q ? 1 : 0) + 99;
+ }
+ private static int test_0_9(int num, AA init, AA zero)
+ {
+ return (init.q ^ zero.q) | num;
+ }
+ private static int test_0_10(int num, AA init, AA zero)
+ {
+ zero.q |= init.q;
+ return zero.q & num;
+ }
+ private static int test_0_11(int num, AA init, AA zero)
+ {
+ return init.q >> zero.q;
+ }
+ private static int test_0_12(int num, AA init, AA zero)
+ {
+ return AA.a_init[init.q].q;
+ }
+ private static int test_0_13(int num, AA init, AA zero)
+ {
+ return AA.aa_init[num - 100, (init.q | 1) - 2, 1 + zero.q].q;
+ }
+ private static int test_0_14(int num, AA init, AA zero)
+ {
+ object bb = init.q;
+ return (int)bb;
+ }
+ private static int test_0_15(int num, AA init, AA zero)
+ {
+ double dbl = init.q;
+ return (int)dbl;
+ }
+ private static int test_0_16(int num, AA init, AA zero)
+ {
+ return AA.call_target(init.q);
+ }
+ private static int test_0_17(int num, AA init, AA zero)
+ {
+ return AA.call_target_ref(ref init.q);
+ }
+ private static int test_1_0(int num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q;
+ }
+ private static int test_1_1(int num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q = num;
+ return r_zero.q;
+ }
+ private static int test_1_2(int num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q + r_zero.q;
+ }
+ private static int test_1_3(int num, ref AA r_init, ref AA r_zero)
+ {
+ return checked(r_init.q - r_zero.q);
+ }
+ private static int test_1_4(int num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q += num; return r_zero.q;
+ }
+ private static int test_1_5(int num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q += r_init.q; return r_zero.q;
+ }
+ private static int test_1_6(int num, ref AA r_init, ref AA r_zero)
+ {
+ if (r_init.q == num)
+ return 100;
+ else
+ return r_zero.q;
+ }
+ private static int test_1_7(int num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q < num + 1 ? 100 : -1;
+ }
+ private static int test_1_8(int num, ref AA r_init, ref AA r_zero)
+ {
+ return (r_init.q > r_zero.q ? 1 : 0) + 99;
+ }
+ private static int test_1_9(int num, ref AA r_init, ref AA r_zero)
+ {
+ return (r_init.q ^ r_zero.q) | num;
+ }
+ private static int test_1_10(int num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q |= r_init.q;
+ return r_zero.q & num;
+ }
+ private static int test_1_11(int num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q >> r_zero.q;
+ }
+ private static int test_1_12(int num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.a_init[r_init.q].q;
+ }
+ private static int test_1_13(int num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.aa_init[num - 100, (r_init.q | 1) - 2, 1 + r_zero.q].q;
+ }
+ private static int test_1_14(int num, ref AA r_init, ref AA r_zero)
+ {
+ object bb = r_init.q;
+ return (int)bb;
+ }
+ private static int test_1_15(int num, ref AA r_init, ref AA r_zero)
+ {
+ double dbl = r_init.q;
+ return (int)dbl;
+ }
+ private static int test_1_16(int num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.call_target(r_init.q);
+ }
+ private static int test_1_17(int num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.call_target_ref(ref r_init.q);
+ }
+ private static int test_2_0(int num)
+ {
+ return AA.a_init[num].q;
+ }
+ private static int test_2_1(int num)
+ {
+ AA.a_zero[num].q = num;
+ return AA.a_zero[num].q;
+ }
+ private static int test_2_2(int num)
+ {
+ return AA.a_init[num].q + AA.a_zero[num].q;
+ }
+ private static int test_2_3(int num)
+ {
+ return checked(AA.a_init[num].q - AA.a_zero[num].q);
+ }
+ private static int test_2_4(int num)
+ {
+ AA.a_zero[num].q += num; return AA.a_zero[num].q;
+ }
+ private static int test_2_5(int num)
+ {
+ AA.a_zero[num].q += AA.a_init[num].q; return AA.a_zero[num].q;
+ }
+ private static int test_2_6(int num)
+ {
+ if (AA.a_init[num].q == num)
+ return 100;
+ else
+ return AA.a_zero[num].q;
+ }
+ private static int test_2_7(int num)
+ {
+ return AA.a_init[num].q < num + 1 ? 100 : -1;
+ }
+ private static int test_2_8(int num)
+ {
+ return (AA.a_init[num].q > AA.a_zero[num].q ? 1 : 0) + 99;
+ }
+ private static int test_2_9(int num)
+ {
+ return (AA.a_init[num].q ^ AA.a_zero[num].q) | num;
+ }
+ private static int test_2_10(int num)
+ {
+ AA.a_zero[num].q |= AA.a_init[num].q;
+ return AA.a_zero[num].q & num;
+ }
+ private static int test_2_11(int num)
+ {
+ return AA.a_init[num].q >> AA.a_zero[num].q;
+ }
+ private static int test_2_12(int num)
+ {
+ return AA.a_init[AA.a_init[num].q].q;
+ }
+ private static int test_2_13(int num)
+ {
+ return AA.aa_init[num - 100, (AA.a_init[num].q | 1) - 2, 1 + AA.a_zero[num].q].q;
+ }
+ private static int test_2_14(int num)
+ {
+ object bb = AA.a_init[num].q;
+ return (int)bb;
+ }
+ private static int test_2_15(int num)
+ {
+ double dbl = AA.a_init[num].q;
+ return (int)dbl;
+ }
+ private static int test_2_16(int num)
+ {
+ return AA.call_target(AA.a_init[num].q);
+ }
+ private static int test_2_17(int num)
+ {
+ return AA.call_target_ref(ref AA.a_init[num].q);
+ }
+ private static int test_3_0(int num)
+ {
+ return AA.aa_init[0, num - 1, num / 100].q;
+ }
+ private static int test_3_1(int num)
+ {
+ AA.aa_zero[0, num - 1, num / 100].q = num;
+ return AA.aa_zero[0, num - 1, num / 100].q;
+ }
+ private static int test_3_2(int num)
+ {
+ return AA.aa_init[0, num - 1, num / 100].q + AA.aa_zero[0, num - 1, num / 100].q;
+ }
+ private static int test_3_3(int num)
+ {
+ return checked(AA.aa_init[0, num - 1, num / 100].q - AA.aa_zero[0, num - 1, num / 100].q);
+ }
+ private static int test_3_4(int num)
+ {
+ AA.aa_zero[0, num - 1, num / 100].q += num; return AA.aa_zero[0, num - 1, num / 100].q;
+ }
+ private static int test_3_5(int num)
+ {
+ AA.aa_zero[0, num - 1, num / 100].q += AA.aa_init[0, num - 1, num / 100].q; return AA.aa_zero[0, num - 1, num / 100].q;
+ }
+ private static int test_3_6(int num)
+ {
+ if (AA.aa_init[0, num - 1, num / 100].q == num)
+ return 100;
+ else
+ return AA.aa_zero[0, num - 1, num / 100].q;
+ }
+ private static int test_3_7(int num)
+ {
+ return AA.aa_init[0, num - 1, num / 100].q < num + 1 ? 100 : -1;
+ }
+ private static int test_3_8(int num)
+ {
+ return (AA.aa_init[0, num - 1, num / 100].q > AA.aa_zero[0, num - 1, num / 100].q ? 1 : 0) + 99;
+ }
+ private static int test_3_9(int num)
+ {
+ return (AA.aa_init[0, num - 1, num / 100].q ^ AA.aa_zero[0, num - 1, num / 100].q) | num;
+ }
+ private static int test_3_10(int num)
+ {
+ AA.aa_zero[0, num - 1, num / 100].q |= AA.aa_init[0, num - 1, num / 100].q;
+ return AA.aa_zero[0, num - 1, num / 100].q & num;
+ }
+ private static int test_3_11(int num)
+ {
+ return AA.aa_init[0, num - 1, num / 100].q >> AA.aa_zero[0, num - 1, num / 100].q;
+ }
+ private static int test_3_12(int num)
+ {
+ return AA.a_init[AA.aa_init[0, num - 1, num / 100].q].q;
+ }
+ private static int test_3_13(int num)
+ {
+ return AA.aa_init[num - 100, (AA.aa_init[0, num - 1, num / 100].q | 1) - 2, 1 + AA.aa_zero[0, num - 1, num / 100].q].q;
+ }
+ private static int test_3_14(int num)
+ {
+ object bb = AA.aa_init[0, num - 1, num / 100].q;
+ return (int)bb;
+ }
+ private static int test_3_15(int num)
+ {
+ double dbl = AA.aa_init[0, num - 1, num / 100].q;
+ return (int)dbl;
+ }
+ private static int test_3_16(int num)
+ {
+ return AA.call_target(AA.aa_init[0, num - 1, num / 100].q);
+ }
+ private static int test_3_17(int num)
+ {
+ return AA.call_target_ref(ref AA.aa_init[0, num - 1, num / 100].q);
+ }
+ private static int test_4_0(int num)
+ {
+ return BB.f_init.q;
+ }
+ private static int test_4_1(int num)
+ {
+ BB.f_zero.q = num;
+ return BB.f_zero.q;
+ }
+ private static int test_4_2(int num)
+ {
+ return BB.f_init.q + BB.f_zero.q;
+ }
+ private static int test_4_3(int num)
+ {
+ return checked(BB.f_init.q - BB.f_zero.q);
+ }
+ private static int test_4_4(int num)
+ {
+ BB.f_zero.q += num; return BB.f_zero.q;
+ }
+ private static int test_4_5(int num)
+ {
+ BB.f_zero.q += BB.f_init.q; return BB.f_zero.q;
+ }
+ private static int test_4_6(int num)
+ {
+ if (BB.f_init.q == num)
+ return 100;
+ else
+ return BB.f_zero.q;
+ }
+ private static int test_4_7(int num)
+ {
+ return BB.f_init.q < num + 1 ? 100 : -1;
+ }
+ private static int test_4_8(int num)
+ {
+ return (BB.f_init.q > BB.f_zero.q ? 1 : 0) + 99;
+ }
+ private static int test_4_9(int num)
+ {
+ return (BB.f_init.q ^ BB.f_zero.q) | num;
+ }
+ private static int test_4_10(int num)
+ {
+ BB.f_zero.q |= BB.f_init.q;
+ return BB.f_zero.q & num;
+ }
+ private static int test_4_11(int num)
+ {
+ return BB.f_init.q >> BB.f_zero.q;
+ }
+ private static int test_4_12(int num)
+ {
+ return AA.a_init[BB.f_init.q].q;
+ }
+ private static int test_4_13(int num)
+ {
+ return AA.aa_init[num - 100, (BB.f_init.q | 1) - 2, 1 + BB.f_zero.q].q;
+ }
+ private static int test_4_14(int num)
+ {
+ object bb = BB.f_init.q;
+ return (int)bb;
+ }
+ private static int test_4_15(int num)
+ {
+ double dbl = BB.f_init.q;
+ return (int)dbl;
+ }
+ private static int test_4_16(int num)
+ {
+ return AA.call_target(BB.f_init.q);
+ }
+ private static int test_4_17(int num)
+ {
+ return AA.call_target_ref(ref BB.f_init.q);
+ }
+ private static int test_5_0(int num)
+ {
+ return ((AA)AA.b_init).q;
+ }
+ private static int test_6_0(int num, TypedReference tr_init)
+ {
+ return __refvalue(tr_init, AA).q;
+ }
+ private static unsafe int test_7_0(int num, void* ptr_init, void* ptr_zero)
+ {
+ return (*((AA*)ptr_init)).q;
+ }
+ private static unsafe int test_7_1(int num, void* ptr_init, void* ptr_zero)
+ {
+ (*((AA*)ptr_zero)).q = num;
+ return (*((AA*)ptr_zero)).q;
+ }
+ private static unsafe int test_7_2(int num, void* ptr_init, void* ptr_zero)
+ {
+ return (*((AA*)ptr_init)).q + (*((AA*)ptr_zero)).q;
+ }
+ private static unsafe int test_7_3(int num, void* ptr_init, void* ptr_zero)
+ {
+ return checked((*((AA*)ptr_init)).q - (*((AA*)ptr_zero)).q);
+ }
+ private static unsafe int test_7_4(int num, void* ptr_init, void* ptr_zero)
+ {
+ (*((AA*)ptr_zero)).q += num; return (*((AA*)ptr_zero)).q;
+ }
+ private static unsafe int test_7_5(int num, void* ptr_init, void* ptr_zero)
+ {
+ (*((AA*)ptr_zero)).q += (*((AA*)ptr_init)).q; return (*((AA*)ptr_zero)).q;
+ }
+ private static unsafe int test_7_6(int num, void* ptr_init, void* ptr_zero)
+ {
+ if ((*((AA*)ptr_init)).q == num)
+ return 100;
+ else
+ return (*((AA*)ptr_zero)).q;
+ }
+ private static unsafe int test_7_7(int num, void* ptr_init, void* ptr_zero)
+ {
+ return (*((AA*)ptr_init)).q < num + 1 ? 100 : -1;
+ }
+ private static unsafe int test_7_8(int num, void* ptr_init, void* ptr_zero)
+ {
+ return ((*((AA*)ptr_init)).q > (*((AA*)ptr_zero)).q ? 1 : 0) + 99;
+ }
+ private static unsafe int test_7_9(int num, void* ptr_init, void* ptr_zero)
+ {
+ return ((*((AA*)ptr_init)).q ^ (*((AA*)ptr_zero)).q) | num;
+ }
+ private static unsafe int test_7_10(int num, void* ptr_init, void* ptr_zero)
+ {
+ (*((AA*)ptr_zero)).q |= (*((AA*)ptr_init)).q;
+ return (*((AA*)ptr_zero)).q & num;
+ }
+ private static unsafe int test_7_11(int num, void* ptr_init, void* ptr_zero)
+ {
+ return (*((AA*)ptr_init)).q >> (*((AA*)ptr_zero)).q;
+ }
+ private static unsafe int test_7_12(int num, void* ptr_init, void* ptr_zero)
+ {
+ return AA.a_init[(*((AA*)ptr_init)).q].q;
+ }
+ private static unsafe int test_7_13(int num, void* ptr_init, void* ptr_zero)
+ {
+ return AA.aa_init[num - 100, ((*((AA*)ptr_init)).q | 1) - 2, 1 + (*((AA*)ptr_zero)).q].q;
+ }
+ private static unsafe int test_7_14(int num, void* ptr_init, void* ptr_zero)
+ {
+ object bb = (*((AA*)ptr_init)).q;
+ return (int)bb;
+ }
+ private static unsafe int test_7_15(int num, void* ptr_init, void* ptr_zero)
+ {
+ double dbl = (*((AA*)ptr_init)).q;
+ return (int)dbl;
+ }
+ private static unsafe int test_7_16(int num, void* ptr_init, void* ptr_zero)
+ {
+ return AA.call_target((*((AA*)ptr_init)).q);
+ }
+ private static unsafe int test_7_17(int num, void* ptr_init, void* ptr_zero)
+ {
+ return AA.call_target_ref(ref (*((AA*)ptr_init)).q);
+ }
+
+ private static unsafe int Main()
+ {
+ AA.reset();
+ if (test_0_0(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_0() failed.");
+ return 101;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_1(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_1() failed.");
+ return 102;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_2(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_2() failed.");
+ return 103;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_3(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_3() failed.");
+ return 104;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_4(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_4() failed.");
+ return 105;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_5(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_5() failed.");
+ return 106;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_6(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_6() failed.");
+ return 107;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_7(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_7() failed.");
+ return 108;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_8(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_8() failed.");
+ return 109;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_9(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_9() failed.");
+ return 110;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_10(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_10() failed.");
+ return 111;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_11(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_11() failed.");
+ return 112;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_12(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_12() failed.");
+ return 113;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_13(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_13() failed.");
+ return 114;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_14(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_14() failed.");
+ return 115;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_15(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_15() failed.");
+ return 116;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_16(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_16() failed.");
+ return 117;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_17(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_17() failed.");
+ return 118;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_0(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_0() failed.");
+ return 119;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_1(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_1() failed.");
+ return 120;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_2(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_2() failed.");
+ return 121;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_3(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_3() failed.");
+ return 122;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_4(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_4() failed.");
+ return 123;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_5(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_5() failed.");
+ return 124;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_6(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_6() failed.");
+ return 125;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_7(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_7() failed.");
+ return 126;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_8(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_8() failed.");
+ return 127;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_9(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_9() failed.");
+ return 128;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_10(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_10() failed.");
+ return 129;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_11(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_11() failed.");
+ return 130;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_12(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_12() failed.");
+ return 131;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_13(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_13() failed.");
+ return 132;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_14(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_14() failed.");
+ return 133;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_15(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_15() failed.");
+ return 134;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_16(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_16() failed.");
+ return 135;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_17(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_17() failed.");
+ return 136;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_0(100) != 100)
+ {
+ Console.WriteLine("test_2_0() failed.");
+ return 137;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_1(100) != 100)
+ {
+ Console.WriteLine("test_2_1() failed.");
+ return 138;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_2(100) != 100)
+ {
+ Console.WriteLine("test_2_2() failed.");
+ return 139;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_3(100) != 100)
+ {
+ Console.WriteLine("test_2_3() failed.");
+ return 140;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_4(100) != 100)
+ {
+ Console.WriteLine("test_2_4() failed.");
+ return 141;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_5(100) != 100)
+ {
+ Console.WriteLine("test_2_5() failed.");
+ return 142;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_6(100) != 100)
+ {
+ Console.WriteLine("test_2_6() failed.");
+ return 143;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_7(100) != 100)
+ {
+ Console.WriteLine("test_2_7() failed.");
+ return 144;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_8(100) != 100)
+ {
+ Console.WriteLine("test_2_8() failed.");
+ return 145;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_9(100) != 100)
+ {
+ Console.WriteLine("test_2_9() failed.");
+ return 146;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_10(100) != 100)
+ {
+ Console.WriteLine("test_2_10() failed.");
+ return 147;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_11(100) != 100)
+ {
+ Console.WriteLine("test_2_11() failed.");
+ return 148;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_12(100) != 100)
+ {
+ Console.WriteLine("test_2_12() failed.");
+ return 149;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_13(100) != 100)
+ {
+ Console.WriteLine("test_2_13() failed.");
+ return 150;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_14(100) != 100)
+ {
+ Console.WriteLine("test_2_14() failed.");
+ return 151;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_15(100) != 100)
+ {
+ Console.WriteLine("test_2_15() failed.");
+ return 152;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_16(100) != 100)
+ {
+ Console.WriteLine("test_2_16() failed.");
+ return 153;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_17(100) != 100)
+ {
+ Console.WriteLine("test_2_17() failed.");
+ return 154;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_0(100) != 100)
+ {
+ Console.WriteLine("test_3_0() failed.");
+ return 155;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_1(100) != 100)
+ {
+ Console.WriteLine("test_3_1() failed.");
+ return 156;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_2(100) != 100)
+ {
+ Console.WriteLine("test_3_2() failed.");
+ return 157;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_3(100) != 100)
+ {
+ Console.WriteLine("test_3_3() failed.");
+ return 158;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_4(100) != 100)
+ {
+ Console.WriteLine("test_3_4() failed.");
+ return 159;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_5(100) != 100)
+ {
+ Console.WriteLine("test_3_5() failed.");
+ return 160;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_6(100) != 100)
+ {
+ Console.WriteLine("test_3_6() failed.");
+ return 161;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_7(100) != 100)
+ {
+ Console.WriteLine("test_3_7() failed.");
+ return 162;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_8(100) != 100)
+ {
+ Console.WriteLine("test_3_8() failed.");
+ return 163;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_9(100) != 100)
+ {
+ Console.WriteLine("test_3_9() failed.");
+ return 164;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_10(100) != 100)
+ {
+ Console.WriteLine("test_3_10() failed.");
+ return 165;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_11(100) != 100)
+ {
+ Console.WriteLine("test_3_11() failed.");
+ return 166;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_12(100) != 100)
+ {
+ Console.WriteLine("test_3_12() failed.");
+ return 167;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_13(100) != 100)
+ {
+ Console.WriteLine("test_3_13() failed.");
+ return 168;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_14(100) != 100)
+ {
+ Console.WriteLine("test_3_14() failed.");
+ return 169;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_15(100) != 100)
+ {
+ Console.WriteLine("test_3_15() failed.");
+ return 170;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_16(100) != 100)
+ {
+ Console.WriteLine("test_3_16() failed.");
+ return 171;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_17(100) != 100)
+ {
+ Console.WriteLine("test_3_17() failed.");
+ return 172;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_0(100) != 100)
+ {
+ Console.WriteLine("test_4_0() failed.");
+ return 173;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_1(100) != 100)
+ {
+ Console.WriteLine("test_4_1() failed.");
+ return 174;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_2(100) != 100)
+ {
+ Console.WriteLine("test_4_2() failed.");
+ return 175;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_3(100) != 100)
+ {
+ Console.WriteLine("test_4_3() failed.");
+ return 176;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_4(100) != 100)
+ {
+ Console.WriteLine("test_4_4() failed.");
+ return 177;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_5(100) != 100)
+ {
+ Console.WriteLine("test_4_5() failed.");
+ return 178;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_6(100) != 100)
+ {
+ Console.WriteLine("test_4_6() failed.");
+ return 179;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_7(100) != 100)
+ {
+ Console.WriteLine("test_4_7() failed.");
+ return 180;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_8(100) != 100)
+ {
+ Console.WriteLine("test_4_8() failed.");
+ return 181;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_9(100) != 100)
+ {
+ Console.WriteLine("test_4_9() failed.");
+ return 182;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_10(100) != 100)
+ {
+ Console.WriteLine("test_4_10() failed.");
+ return 183;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_11(100) != 100)
+ {
+ Console.WriteLine("test_4_11() failed.");
+ return 184;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_12(100) != 100)
+ {
+ Console.WriteLine("test_4_12() failed.");
+ return 185;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_13(100) != 100)
+ {
+ Console.WriteLine("test_4_13() failed.");
+ return 186;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_14(100) != 100)
+ {
+ Console.WriteLine("test_4_14() failed.");
+ return 187;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_15(100) != 100)
+ {
+ Console.WriteLine("test_4_15() failed.");
+ return 188;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_16(100) != 100)
+ {
+ Console.WriteLine("test_4_16() failed.");
+ return 189;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_17(100) != 100)
+ {
+ Console.WriteLine("test_4_17() failed.");
+ return 190;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_5_0(100) != 100)
+ {
+ Console.WriteLine("test_5_0() failed.");
+ return 191;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_6_0(100, __makeref(AA._init)) != 100)
+ {
+ Console.WriteLine("test_6_0() failed.");
+ return 192;
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_0(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_0() failed.");
+ return 193;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_1(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_1() failed.");
+ return 194;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_2(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_2() failed.");
+ return 195;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_3(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_3() failed.");
+ return 196;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_4(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_4() failed.");
+ return 197;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_5(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_5() failed.");
+ return 198;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_6(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_6() failed.");
+ return 199;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_7(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_7() failed.");
+ return 200;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_8(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_8() failed.");
+ return 201;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_9(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_9() failed.");
+ return 202;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_10(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_10() failed.");
+ return 203;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_11(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_11() failed.");
+ return 204;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_12(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_12() failed.");
+ return 205;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_13(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_13() failed.");
+ return 206;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_14(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_14() failed.");
+ return 207;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_15(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_15() failed.");
+ return 208;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_16(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_16() failed.");
+ return 209;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_17(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_17() failed.");
+ return 210;
+ }
+ }
+ AA.verify_all(); Console.WriteLine("All tests passed.");
+ return 100;
+ }
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/body_long.cs b/tests/src/JIT/Methodical/explicit/coverage/body_long.cs
new file mode 100644
index 0000000000..075a7c1efa
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/body_long.cs
@@ -0,0 +1,1210 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+
+internal class TestApp
+{
+ private static long test_0_0(long num, AA init, AA zero)
+ {
+ return init.q;
+ }
+ private static long test_0_1(long num, AA init, AA zero)
+ {
+ zero.q = num;
+ return zero.q;
+ }
+ private static long test_0_2(long num, AA init, AA zero)
+ {
+ return init.q + zero.q;
+ }
+ private static long test_0_3(long num, AA init, AA zero)
+ {
+ return checked(init.q - zero.q);
+ }
+ private static long test_0_4(long num, AA init, AA zero)
+ {
+ zero.q += num; return zero.q;
+ }
+ private static long test_0_5(long num, AA init, AA zero)
+ {
+ zero.q += init.q; return zero.q;
+ }
+ private static long test_0_6(long num, AA init, AA zero)
+ {
+ if (init.q == num)
+ return 100;
+ else
+ return zero.q;
+ }
+ private static long test_0_7(long num, AA init, AA zero)
+ {
+ return init.q < num + 1 ? 100 : -1;
+ }
+ private static long test_0_8(long num, AA init, AA zero)
+ {
+ return (init.q > zero.q ? 1 : 0) + 99;
+ }
+ private static long test_0_9(long num, AA init, AA zero)
+ {
+ return (init.q ^ zero.q) | num;
+ }
+ private static long test_0_10(long num, AA init, AA zero)
+ {
+ zero.q |= init.q;
+ return zero.q & num;
+ }
+ private static long test_0_11(long num, AA init, AA zero)
+ {
+ return init.q >> (int)zero.q;
+ }
+ private static long test_0_12(long num, AA init, AA zero)
+ {
+ return AA.a_init[init.q].q;
+ }
+ private static long test_0_13(long num, AA init, AA zero)
+ {
+ return AA.aa_init[num - 100, (init.q | 1) - 2, 1 + zero.q].q;
+ }
+ private static long test_0_14(long num, AA init, AA zero)
+ {
+ object bb = init.q;
+ return (long)bb;
+ }
+ private static long test_0_15(long num, AA init, AA zero)
+ {
+ double dbl = init.q;
+ return (long)dbl;
+ }
+ private static long test_0_16(long num, AA init, AA zero)
+ {
+ return AA.call_target(init.q);
+ }
+ private static long test_0_17(long num, AA init, AA zero)
+ {
+ return AA.call_target_ref(ref init.q);
+ }
+ private static long test_1_0(long num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q;
+ }
+ private static long test_1_1(long num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q = num;
+ return r_zero.q;
+ }
+ private static long test_1_2(long num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q + r_zero.q;
+ }
+ private static long test_1_3(long num, ref AA r_init, ref AA r_zero)
+ {
+ return checked(r_init.q - r_zero.q);
+ }
+ private static long test_1_4(long num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q += num; return r_zero.q;
+ }
+ private static long test_1_5(long num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q += r_init.q; return r_zero.q;
+ }
+ private static long test_1_6(long num, ref AA r_init, ref AA r_zero)
+ {
+ if (r_init.q == num)
+ return 100;
+ else
+ return r_zero.q;
+ }
+ private static long test_1_7(long num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q < num + 1 ? 100 : -1;
+ }
+ private static long test_1_8(long num, ref AA r_init, ref AA r_zero)
+ {
+ return (r_init.q > r_zero.q ? 1 : 0) + 99;
+ }
+ private static long test_1_9(long num, ref AA r_init, ref AA r_zero)
+ {
+ return (r_init.q ^ r_zero.q) | num;
+ }
+ private static long test_1_10(long num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q |= r_init.q;
+ return r_zero.q & num;
+ }
+ private static long test_1_11(long num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q >> (int)r_zero.q;
+ }
+ private static long test_1_12(long num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.a_init[r_init.q].q;
+ }
+ private static long test_1_13(long num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.aa_init[num - 100, (r_init.q | 1) - 2, 1 + r_zero.q].q;
+ }
+ private static long test_1_14(long num, ref AA r_init, ref AA r_zero)
+ {
+ object bb = r_init.q;
+ return (long)bb;
+ }
+ private static long test_1_15(long num, ref AA r_init, ref AA r_zero)
+ {
+ double dbl = r_init.q;
+ return (long)dbl;
+ }
+ private static long test_1_16(long num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.call_target(r_init.q);
+ }
+ private static long test_1_17(long num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.call_target_ref(ref r_init.q);
+ }
+ private static long test_2_0(long num)
+ {
+ return AA.a_init[num].q;
+ }
+ private static long test_2_1(long num)
+ {
+ AA.a_zero[num].q = num;
+ return AA.a_zero[num].q;
+ }
+ private static long test_2_2(long num)
+ {
+ return AA.a_init[num].q + AA.a_zero[num].q;
+ }
+ private static long test_2_3(long num)
+ {
+ return checked(AA.a_init[num].q - AA.a_zero[num].q);
+ }
+ private static long test_2_4(long num)
+ {
+ AA.a_zero[num].q += num; return AA.a_zero[num].q;
+ }
+ private static long test_2_5(long num)
+ {
+ AA.a_zero[num].q += AA.a_init[num].q; return AA.a_zero[num].q;
+ }
+ private static long test_2_6(long num)
+ {
+ if (AA.a_init[num].q == num)
+ return 100;
+ else
+ return AA.a_zero[num].q;
+ }
+ private static long test_2_7(long num)
+ {
+ return AA.a_init[num].q < num + 1 ? 100 : -1;
+ }
+ private static long test_2_8(long num)
+ {
+ return (AA.a_init[num].q > AA.a_zero[num].q ? 1 : 0) + 99;
+ }
+ private static long test_2_9(long num)
+ {
+ return (AA.a_init[num].q ^ AA.a_zero[num].q) | num;
+ }
+ private static long test_2_10(long num)
+ {
+ AA.a_zero[num].q |= AA.a_init[num].q;
+ return AA.a_zero[num].q & num;
+ }
+ private static long test_2_11(long num)
+ {
+ return AA.a_init[num].q >> (int)AA.a_zero[num].q;
+ }
+ private static long test_2_12(long num)
+ {
+ return AA.a_init[AA.a_init[num].q].q;
+ }
+ private static long test_2_13(long num)
+ {
+ return AA.aa_init[num - 100, (AA.a_init[num].q | 1) - 2, 1 + AA.a_zero[num].q].q;
+ }
+ private static long test_2_14(long num)
+ {
+ object bb = AA.a_init[num].q;
+ return (long)bb;
+ }
+ private static long test_2_15(long num)
+ {
+ double dbl = AA.a_init[num].q;
+ return (long)dbl;
+ }
+ private static long test_2_16(long num)
+ {
+ return AA.call_target(AA.a_init[num].q);
+ }
+ private static long test_2_17(long num)
+ {
+ return AA.call_target_ref(ref AA.a_init[num].q);
+ }
+ private static long test_3_0(long num)
+ {
+ return AA.aa_init[0, num - 1, num / 100].q;
+ }
+ private static long test_3_1(long num)
+ {
+ AA.aa_zero[0, num - 1, num / 100].q = num;
+ return AA.aa_zero[0, num - 1, num / 100].q;
+ }
+ private static long test_3_2(long num)
+ {
+ return AA.aa_init[0, num - 1, num / 100].q + AA.aa_zero[0, num - 1, num / 100].q;
+ }
+ private static long test_3_3(long num)
+ {
+ return checked(AA.aa_init[0, num - 1, num / 100].q - AA.aa_zero[0, num - 1, num / 100].q);
+ }
+ private static long test_3_4(long num)
+ {
+ AA.aa_zero[0, num - 1, num / 100].q += num; return AA.aa_zero[0, num - 1, num / 100].q;
+ }
+ private static long test_3_5(long num)
+ {
+ AA.aa_zero[0, num - 1, num / 100].q += AA.aa_init[0, num - 1, num / 100].q; return AA.aa_zero[0, num - 1, num / 100].q;
+ }
+ private static long test_3_6(long num)
+ {
+ if (AA.aa_init[0, num - 1, num / 100].q == num)
+ return 100;
+ else
+ return AA.aa_zero[0, num - 1, num / 100].q;
+ }
+ private static long test_3_7(long num)
+ {
+ return AA.aa_init[0, num - 1, num / 100].q < num + 1 ? 100 : -1;
+ }
+ private static long test_3_8(long num)
+ {
+ return (AA.aa_init[0, num - 1, num / 100].q > AA.aa_zero[0, num - 1, num / 100].q ? 1 : 0) + 99;
+ }
+ private static long test_3_9(long num)
+ {
+ return (AA.aa_init[0, num - 1, num / 100].q ^ AA.aa_zero[0, num - 1, num / 100].q) | num;
+ }
+ private static long test_3_10(long num)
+ {
+ AA.aa_zero[0, num - 1, num / 100].q |= AA.aa_init[0, num - 1, num / 100].q;
+ return AA.aa_zero[0, num - 1, num / 100].q & num;
+ }
+ private static long test_3_11(long num)
+ {
+ return AA.aa_init[0, num - 1, num / 100].q >> (int)AA.aa_zero[0, num - 1, num / 100].q;
+ }
+ private static long test_3_12(long num)
+ {
+ return AA.a_init[AA.aa_init[0, num - 1, num / 100].q].q;
+ }
+ private static long test_3_13(long num)
+ {
+ return AA.aa_init[num - 100, (AA.aa_init[0, num - 1, num / 100].q | 1) - 2, 1 + AA.aa_zero[0, num - 1, num / 100].q].q;
+ }
+ private static long test_3_14(long num)
+ {
+ object bb = AA.aa_init[0, num - 1, num / 100].q;
+ return (long)bb;
+ }
+ private static long test_3_15(long num)
+ {
+ double dbl = AA.aa_init[0, num - 1, num / 100].q;
+ return (long)dbl;
+ }
+ private static long test_3_16(long num)
+ {
+ return AA.call_target(AA.aa_init[0, num - 1, num / 100].q);
+ }
+ private static long test_3_17(long num)
+ {
+ return AA.call_target_ref(ref AA.aa_init[0, num - 1, num / 100].q);
+ }
+ private static long test_4_0(long num)
+ {
+ return BB.f_init.q;
+ }
+ private static long test_4_1(long num)
+ {
+ BB.f_zero.q = num;
+ return BB.f_zero.q;
+ }
+ private static long test_4_2(long num)
+ {
+ return BB.f_init.q + BB.f_zero.q;
+ }
+ private static long test_4_3(long num)
+ {
+ return checked(BB.f_init.q - BB.f_zero.q);
+ }
+ private static long test_4_4(long num)
+ {
+ BB.f_zero.q += num; return BB.f_zero.q;
+ }
+ private static long test_4_5(long num)
+ {
+ BB.f_zero.q += BB.f_init.q; return BB.f_zero.q;
+ }
+ private static long test_4_6(long num)
+ {
+ if (BB.f_init.q == num)
+ return 100;
+ else
+ return BB.f_zero.q;
+ }
+ private static long test_4_7(long num)
+ {
+ return BB.f_init.q < num + 1 ? 100 : -1;
+ }
+ private static long test_4_8(long num)
+ {
+ return (BB.f_init.q > BB.f_zero.q ? 1 : 0) + 99;
+ }
+ private static long test_4_9(long num)
+ {
+ return (BB.f_init.q ^ BB.f_zero.q) | num;
+ }
+ private static long test_4_10(long num)
+ {
+ BB.f_zero.q |= BB.f_init.q;
+ return BB.f_zero.q & num;
+ }
+ private static long test_4_11(long num)
+ {
+ return BB.f_init.q >> (int)BB.f_zero.q;
+ }
+ private static long test_4_12(long num)
+ {
+ return AA.a_init[BB.f_init.q].q;
+ }
+ private static long test_4_13(long num)
+ {
+ return AA.aa_init[num - 100, (BB.f_init.q | 1) - 2, 1 + BB.f_zero.q].q;
+ }
+ private static long test_4_14(long num)
+ {
+ object bb = BB.f_init.q;
+ return (long)bb;
+ }
+ private static long test_4_15(long num)
+ {
+ double dbl = BB.f_init.q;
+ return (long)dbl;
+ }
+ private static long test_4_16(long num)
+ {
+ return AA.call_target(BB.f_init.q);
+ }
+ private static long test_4_17(long num)
+ {
+ return AA.call_target_ref(ref BB.f_init.q);
+ }
+ private static long test_5_0(long num)
+ {
+ return ((AA)AA.b_init).q;
+ }
+ private static long test_6_0(long num, TypedReference tr_init)
+ {
+ return __refvalue(tr_init, AA).q;
+ }
+ private static unsafe long test_7_0(long num, void* ptr_init, void* ptr_zero)
+ {
+ return (*((AA*)ptr_init)).q;
+ }
+ private static unsafe long test_7_1(long num, void* ptr_init, void* ptr_zero)
+ {
+ (*((AA*)ptr_zero)).q = num;
+ return (*((AA*)ptr_zero)).q;
+ }
+ private static unsafe long test_7_2(long num, void* ptr_init, void* ptr_zero)
+ {
+ return (*((AA*)ptr_init)).q + (*((AA*)ptr_zero)).q;
+ }
+ private static unsafe long test_7_3(long num, void* ptr_init, void* ptr_zero)
+ {
+ return checked((*((AA*)ptr_init)).q - (*((AA*)ptr_zero)).q);
+ }
+ private static unsafe long test_7_4(long num, void* ptr_init, void* ptr_zero)
+ {
+ (*((AA*)ptr_zero)).q += num; return (*((AA*)ptr_zero)).q;
+ }
+ private static unsafe long test_7_5(long num, void* ptr_init, void* ptr_zero)
+ {
+ (*((AA*)ptr_zero)).q += (*((AA*)ptr_init)).q; return (*((AA*)ptr_zero)).q;
+ }
+ private static unsafe long test_7_6(long num, void* ptr_init, void* ptr_zero)
+ {
+ if ((*((AA*)ptr_init)).q == num)
+ return 100;
+ else
+ return (*((AA*)ptr_zero)).q;
+ }
+ private static unsafe long test_7_7(long num, void* ptr_init, void* ptr_zero)
+ {
+ return (*((AA*)ptr_init)).q < num + 1 ? 100 : -1;
+ }
+ private static unsafe long test_7_8(long num, void* ptr_init, void* ptr_zero)
+ {
+ return ((*((AA*)ptr_init)).q > (*((AA*)ptr_zero)).q ? 1 : 0) + 99;
+ }
+ private static unsafe long test_7_9(long num, void* ptr_init, void* ptr_zero)
+ {
+ return ((*((AA*)ptr_init)).q ^ (*((AA*)ptr_zero)).q) | num;
+ }
+ private static unsafe long test_7_10(long num, void* ptr_init, void* ptr_zero)
+ {
+ (*((AA*)ptr_zero)).q |= (*((AA*)ptr_init)).q;
+ return (*((AA*)ptr_zero)).q & num;
+ }
+ private static unsafe long test_7_11(long num, void* ptr_init, void* ptr_zero)
+ {
+ return (*((AA*)ptr_init)).q >> (int)(*((AA*)ptr_zero)).q;
+ }
+ private static unsafe long test_7_12(long num, void* ptr_init, void* ptr_zero)
+ {
+ return AA.a_init[(*((AA*)ptr_init)).q].q;
+ }
+ private static unsafe long test_7_13(long num, void* ptr_init, void* ptr_zero)
+ {
+ return AA.aa_init[num - 100, ((*((AA*)ptr_init)).q | 1) - 2, 1 + (*((AA*)ptr_zero)).q].q;
+ }
+ private static unsafe long test_7_14(long num, void* ptr_init, void* ptr_zero)
+ {
+ object bb = (*((AA*)ptr_init)).q;
+ return (long)bb;
+ }
+ private static unsafe long test_7_15(long num, void* ptr_init, void* ptr_zero)
+ {
+ double dbl = (*((AA*)ptr_init)).q;
+ return (long)dbl;
+ }
+ private static unsafe long test_7_16(long num, void* ptr_init, void* ptr_zero)
+ {
+ return AA.call_target((*((AA*)ptr_init)).q);
+ }
+ private static unsafe long test_7_17(long num, void* ptr_init, void* ptr_zero)
+ {
+ return AA.call_target_ref(ref (*((AA*)ptr_init)).q);
+ }
+
+ private static unsafe int Main()
+ {
+ AA.reset();
+ if (test_0_0(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_0() failed.");
+ return 101;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_1(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_1() failed.");
+ return 102;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_2(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_2() failed.");
+ return 103;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_3(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_3() failed.");
+ return 104;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_4(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_4() failed.");
+ return 105;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_5(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_5() failed.");
+ return 106;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_6(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_6() failed.");
+ return 107;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_7(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_7() failed.");
+ return 108;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_8(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_8() failed.");
+ return 109;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_9(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_9() failed.");
+ return 110;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_10(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_10() failed.");
+ return 111;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_11(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_11() failed.");
+ return 112;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_12(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_12() failed.");
+ return 113;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_13(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_13() failed.");
+ return 114;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_14(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_14() failed.");
+ return 115;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_15(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_15() failed.");
+ return 116;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_16(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_16() failed.");
+ return 117;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_17(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_17() failed.");
+ return 118;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_0(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_0() failed.");
+ return 119;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_1(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_1() failed.");
+ return 120;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_2(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_2() failed.");
+ return 121;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_3(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_3() failed.");
+ return 122;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_4(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_4() failed.");
+ return 123;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_5(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_5() failed.");
+ return 124;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_6(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_6() failed.");
+ return 125;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_7(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_7() failed.");
+ return 126;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_8(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_8() failed.");
+ return 127;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_9(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_9() failed.");
+ return 128;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_10(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_10() failed.");
+ return 129;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_11(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_11() failed.");
+ return 130;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_12(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_12() failed.");
+ return 131;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_13(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_13() failed.");
+ return 132;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_14(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_14() failed.");
+ return 133;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_15(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_15() failed.");
+ return 134;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_16(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_16() failed.");
+ return 135;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_17(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_17() failed.");
+ return 136;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_0(100) != 100)
+ {
+ Console.WriteLine("test_2_0() failed.");
+ return 137;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_1(100) != 100)
+ {
+ Console.WriteLine("test_2_1() failed.");
+ return 138;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_2(100) != 100)
+ {
+ Console.WriteLine("test_2_2() failed.");
+ return 139;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_3(100) != 100)
+ {
+ Console.WriteLine("test_2_3() failed.");
+ return 140;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_4(100) != 100)
+ {
+ Console.WriteLine("test_2_4() failed.");
+ return 141;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_5(100) != 100)
+ {
+ Console.WriteLine("test_2_5() failed.");
+ return 142;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_6(100) != 100)
+ {
+ Console.WriteLine("test_2_6() failed.");
+ return 143;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_7(100) != 100)
+ {
+ Console.WriteLine("test_2_7() failed.");
+ return 144;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_8(100) != 100)
+ {
+ Console.WriteLine("test_2_8() failed.");
+ return 145;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_9(100) != 100)
+ {
+ Console.WriteLine("test_2_9() failed.");
+ return 146;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_10(100) != 100)
+ {
+ Console.WriteLine("test_2_10() failed.");
+ return 147;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_11(100) != 100)
+ {
+ Console.WriteLine("test_2_11() failed.");
+ return 148;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_12(100) != 100)
+ {
+ Console.WriteLine("test_2_12() failed.");
+ return 149;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_13(100) != 100)
+ {
+ Console.WriteLine("test_2_13() failed.");
+ return 150;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_14(100) != 100)
+ {
+ Console.WriteLine("test_2_14() failed.");
+ return 151;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_15(100) != 100)
+ {
+ Console.WriteLine("test_2_15() failed.");
+ return 152;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_16(100) != 100)
+ {
+ Console.WriteLine("test_2_16() failed.");
+ return 153;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_17(100) != 100)
+ {
+ Console.WriteLine("test_2_17() failed.");
+ return 154;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_0(100) != 100)
+ {
+ Console.WriteLine("test_3_0() failed.");
+ return 155;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_1(100) != 100)
+ {
+ Console.WriteLine("test_3_1() failed.");
+ return 156;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_2(100) != 100)
+ {
+ Console.WriteLine("test_3_2() failed.");
+ return 157;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_3(100) != 100)
+ {
+ Console.WriteLine("test_3_3() failed.");
+ return 158;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_4(100) != 100)
+ {
+ Console.WriteLine("test_3_4() failed.");
+ return 159;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_5(100) != 100)
+ {
+ Console.WriteLine("test_3_5() failed.");
+ return 160;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_6(100) != 100)
+ {
+ Console.WriteLine("test_3_6() failed.");
+ return 161;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_7(100) != 100)
+ {
+ Console.WriteLine("test_3_7() failed.");
+ return 162;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_8(100) != 100)
+ {
+ Console.WriteLine("test_3_8() failed.");
+ return 163;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_9(100) != 100)
+ {
+ Console.WriteLine("test_3_9() failed.");
+ return 164;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_10(100) != 100)
+ {
+ Console.WriteLine("test_3_10() failed.");
+ return 165;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_11(100) != 100)
+ {
+ Console.WriteLine("test_3_11() failed.");
+ return 166;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_12(100) != 100)
+ {
+ Console.WriteLine("test_3_12() failed.");
+ return 167;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_13(100) != 100)
+ {
+ Console.WriteLine("test_3_13() failed.");
+ return 168;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_14(100) != 100)
+ {
+ Console.WriteLine("test_3_14() failed.");
+ return 169;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_15(100) != 100)
+ {
+ Console.WriteLine("test_3_15() failed.");
+ return 170;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_16(100) != 100)
+ {
+ Console.WriteLine("test_3_16() failed.");
+ return 171;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_17(100) != 100)
+ {
+ Console.WriteLine("test_3_17() failed.");
+ return 172;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_0(100) != 100)
+ {
+ Console.WriteLine("test_4_0() failed.");
+ return 173;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_1(100) != 100)
+ {
+ Console.WriteLine("test_4_1() failed.");
+ return 174;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_2(100) != 100)
+ {
+ Console.WriteLine("test_4_2() failed.");
+ return 175;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_3(100) != 100)
+ {
+ Console.WriteLine("test_4_3() failed.");
+ return 176;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_4(100) != 100)
+ {
+ Console.WriteLine("test_4_4() failed.");
+ return 177;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_5(100) != 100)
+ {
+ Console.WriteLine("test_4_5() failed.");
+ return 178;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_6(100) != 100)
+ {
+ Console.WriteLine("test_4_6() failed.");
+ return 179;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_7(100) != 100)
+ {
+ Console.WriteLine("test_4_7() failed.");
+ return 180;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_8(100) != 100)
+ {
+ Console.WriteLine("test_4_8() failed.");
+ return 181;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_9(100) != 100)
+ {
+ Console.WriteLine("test_4_9() failed.");
+ return 182;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_10(100) != 100)
+ {
+ Console.WriteLine("test_4_10() failed.");
+ return 183;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_11(100) != 100)
+ {
+ Console.WriteLine("test_4_11() failed.");
+ return 184;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_12(100) != 100)
+ {
+ Console.WriteLine("test_4_12() failed.");
+ return 185;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_13(100) != 100)
+ {
+ Console.WriteLine("test_4_13() failed.");
+ return 186;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_14(100) != 100)
+ {
+ Console.WriteLine("test_4_14() failed.");
+ return 187;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_15(100) != 100)
+ {
+ Console.WriteLine("test_4_15() failed.");
+ return 188;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_16(100) != 100)
+ {
+ Console.WriteLine("test_4_16() failed.");
+ return 189;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_17(100) != 100)
+ {
+ Console.WriteLine("test_4_17() failed.");
+ return 190;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_5_0(100) != 100)
+ {
+ Console.WriteLine("test_5_0() failed.");
+ return 191;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_6_0(100, __makeref(AA._init)) != 100)
+ {
+ Console.WriteLine("test_6_0() failed.");
+ return 192;
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_0(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_0() failed.");
+ return 193;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_1(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_1() failed.");
+ return 194;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_2(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_2() failed.");
+ return 195;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_3(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_3() failed.");
+ return 196;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_4(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_4() failed.");
+ return 197;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_5(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_5() failed.");
+ return 198;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_6(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_6() failed.");
+ return 199;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_7(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_7() failed.");
+ return 200;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_8(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_8() failed.");
+ return 201;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_9(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_9() failed.");
+ return 202;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_10(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_10() failed.");
+ return 203;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_11(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_11() failed.");
+ return 204;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_12(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_12() failed.");
+ return 205;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_13(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_13() failed.");
+ return 206;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_14(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_14() failed.");
+ return 207;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_15(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_15() failed.");
+ return 208;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_16(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_16() failed.");
+ return 209;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_17(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_17() failed.");
+ return 210;
+ }
+ }
+ AA.verify_all(); Console.WriteLine("All tests passed.");
+ return 100;
+ }
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/body_obj.cs b/tests/src/JIT/Methodical/explicit/coverage/body_obj.cs
new file mode 100644
index 0000000000..b65377e780
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/body_obj.cs
@@ -0,0 +1,819 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+
+internal class TestApp
+{
+ private static int test_0_0(int num, AA init, AA zero)
+ {
+ return init.q.val;
+ }
+ private static int test_0_1(int num, AA init, AA zero)
+ {
+ zero.q.val = num;
+ return zero.q.val;
+ }
+ private static int test_0_2(int num, AA init, AA zero)
+ {
+ if (init.q != zero.q)
+ return 100;
+ else
+ return zero.q.val;
+ }
+ private static int test_0_3(int num, AA init, AA zero)
+ {
+ return init.q.val < num + 1 ? 100 : -1;
+ }
+ private static int test_0_4(int num, AA init, AA zero)
+ {
+ return (init.q.val > zero.q.val ? 1 : 0) + 99;
+ }
+ private static int test_0_5(int num, AA init, AA zero)
+ {
+ return (init.q.val ^ zero.q.val) | num;
+ }
+ private static int test_0_6(int num, AA init, AA zero)
+ {
+ zero.q.val |= init.q.val;
+ return zero.q.val & num;
+ }
+ private static int test_0_7(int num, AA init, AA zero)
+ {
+ return init.q.val >> zero.q.val;
+ }
+ private static int test_0_8(int num, AA init, AA zero)
+ {
+ return AA.a_init[init.q.val].q.val;
+ }
+ private static int test_0_9(int num, AA init, AA zero)
+ {
+ return AA.aa_init[num - 100, (init.q.val | 1) - 2, 1 + zero.q.val].q.val;
+ }
+ private static int test_0_10(int num, AA init, AA zero)
+ {
+ object bb = init.q.val;
+ return (int)bb;
+ }
+ private static int test_0_11(int num, AA init, AA zero)
+ {
+ double dbl = init.q.val;
+ return (int)dbl;
+ }
+ private static int test_0_12(int num, AA init, AA zero)
+ {
+ return AA.call_target(init.q).val;
+ }
+ private static int test_0_13(int num, AA init, AA zero)
+ {
+ return AA.call_target_ref(ref init.q).val;
+ }
+ private static int test_0_14(int num, AA init, AA zero)
+ {
+ return init.q.ret_code();
+ }
+ private static int test_1_0(int num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q.val;
+ }
+ private static int test_1_1(int num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q.val = num;
+ return r_zero.q.val;
+ }
+ private static int test_1_2(int num, ref AA r_init, ref AA r_zero)
+ {
+ if (r_init.q != r_zero.q)
+ return 100;
+ else
+ return r_zero.q.val;
+ }
+ private static int test_1_3(int num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q.val < num + 1 ? 100 : -1;
+ }
+ private static int test_1_4(int num, ref AA r_init, ref AA r_zero)
+ {
+ return (r_init.q.val > r_zero.q.val ? 1 : 0) + 99;
+ }
+ private static int test_1_5(int num, ref AA r_init, ref AA r_zero)
+ {
+ return (r_init.q.val ^ r_zero.q.val) | num;
+ }
+ private static int test_1_6(int num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q.val |= r_init.q.val;
+ return r_zero.q.val & num;
+ }
+ private static int test_1_7(int num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q.val >> r_zero.q.val;
+ }
+ private static int test_1_8(int num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.a_init[r_init.q.val].q.val;
+ }
+ private static int test_1_9(int num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.aa_init[num - 100, (r_init.q.val | 1) - 2, 1 + r_zero.q.val].q.val;
+ }
+ private static int test_1_10(int num, ref AA r_init, ref AA r_zero)
+ {
+ object bb = r_init.q.val;
+ return (int)bb;
+ }
+ private static int test_1_11(int num, ref AA r_init, ref AA r_zero)
+ {
+ double dbl = r_init.q.val;
+ return (int)dbl;
+ }
+ private static int test_1_12(int num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.call_target(r_init.q).val;
+ }
+ private static int test_1_13(int num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.call_target_ref(ref r_init.q).val;
+ }
+ private static int test_1_14(int num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q.ret_code();
+ }
+ private static int test_2_0(int num)
+ {
+ return AA.a_init[num].q.val;
+ }
+ private static int test_2_1(int num)
+ {
+ AA.a_zero[num].q.val = num;
+ return AA.a_zero[num].q.val;
+ }
+ private static int test_2_2(int num)
+ {
+ if (AA.a_init[num].q != AA.a_zero[num].q)
+ return 100;
+ else
+ return AA.a_zero[num].q.val;
+ }
+ private static int test_2_3(int num)
+ {
+ return AA.a_init[num].q.val < num + 1 ? 100 : -1;
+ }
+ private static int test_2_4(int num)
+ {
+ return (AA.a_init[num].q.val > AA.a_zero[num].q.val ? 1 : 0) + 99;
+ }
+ private static int test_2_5(int num)
+ {
+ return (AA.a_init[num].q.val ^ AA.a_zero[num].q.val) | num;
+ }
+ private static int test_2_6(int num)
+ {
+ AA.a_zero[num].q.val |= AA.a_init[num].q.val;
+ return AA.a_zero[num].q.val & num;
+ }
+ private static int test_2_7(int num)
+ {
+ return AA.a_init[num].q.val >> AA.a_zero[num].q.val;
+ }
+ private static int test_2_8(int num)
+ {
+ return AA.a_init[AA.a_init[num].q.val].q.val;
+ }
+ private static int test_2_9(int num)
+ {
+ return AA.aa_init[num - 100, (AA.a_init[num].q.val | 1) - 2, 1 + AA.a_zero[num].q.val].q.val;
+ }
+ private static int test_2_10(int num)
+ {
+ object bb = AA.a_init[num].q.val;
+ return (int)bb;
+ }
+ private static int test_2_11(int num)
+ {
+ double dbl = AA.a_init[num].q.val;
+ return (int)dbl;
+ }
+ private static int test_2_12(int num)
+ {
+ return AA.call_target(AA.a_init[num].q).val;
+ }
+ private static int test_2_13(int num)
+ {
+ return AA.call_target_ref(ref AA.a_init[num].q).val;
+ }
+ private static int test_2_14(int num)
+ {
+ return AA.a_init[num].q.ret_code();
+ }
+ private static int test_3_0(int num)
+ {
+ return AA.aa_init[0, num - 1, num / 100].q.val;
+ }
+ private static int test_3_1(int num)
+ {
+ AA.aa_zero[0, num - 1, num / 100].q.val = num;
+ return AA.aa_zero[0, num - 1, num / 100].q.val;
+ }
+ private static int test_3_2(int num)
+ {
+ if (AA.aa_init[0, num - 1, num / 100].q != AA.aa_zero[0, num - 1, num / 100].q)
+ return 100;
+ else
+ return AA.aa_zero[0, num - 1, num / 100].q.val;
+ }
+ private static int test_3_3(int num)
+ {
+ return AA.aa_init[0, num - 1, num / 100].q.val < num + 1 ? 100 : -1;
+ }
+ private static int test_3_4(int num)
+ {
+ return (AA.aa_init[0, num - 1, num / 100].q.val > AA.aa_zero[0, num - 1, num / 100].q.val ? 1 : 0) + 99;
+ }
+ private static int test_3_5(int num)
+ {
+ return (AA.aa_init[0, num - 1, num / 100].q.val ^ AA.aa_zero[0, num - 1, num / 100].q.val) | num;
+ }
+ private static int test_3_6(int num)
+ {
+ AA.aa_zero[0, num - 1, num / 100].q.val |= AA.aa_init[0, num - 1, num / 100].q.val;
+ return AA.aa_zero[0, num - 1, num / 100].q.val & num;
+ }
+ private static int test_3_7(int num)
+ {
+ return AA.aa_init[0, num - 1, num / 100].q.val >> AA.aa_zero[0, num - 1, num / 100].q.val;
+ }
+ private static int test_3_8(int num)
+ {
+ return AA.a_init[AA.aa_init[0, num - 1, num / 100].q.val].q.val;
+ }
+ private static int test_3_9(int num)
+ {
+ return AA.aa_init[num - 100, (AA.aa_init[0, num - 1, num / 100].q.val | 1) - 2, 1 + AA.aa_zero[0, num - 1, num / 100].q.val].q.val;
+ }
+ private static int test_3_10(int num)
+ {
+ object bb = AA.aa_init[0, num - 1, num / 100].q.val;
+ return (int)bb;
+ }
+ private static int test_3_11(int num)
+ {
+ double dbl = AA.aa_init[0, num - 1, num / 100].q.val;
+ return (int)dbl;
+ }
+ private static int test_3_12(int num)
+ {
+ return AA.call_target(AA.aa_init[0, num - 1, num / 100].q).val;
+ }
+ private static int test_3_13(int num)
+ {
+ return AA.call_target_ref(ref AA.aa_init[0, num - 1, num / 100].q).val;
+ }
+ private static int test_3_14(int num)
+ {
+ return AA.aa_init[0, num - 1, num / 100].q.ret_code();
+ }
+ private static int test_4_0(int num)
+ {
+ return BB.f_init.q.val;
+ }
+ private static int test_4_1(int num)
+ {
+ BB.f_zero.q.val = num;
+ return BB.f_zero.q.val;
+ }
+ private static int test_4_2(int num)
+ {
+ if (BB.f_init.q != BB.f_zero.q)
+ return 100;
+ else
+ return BB.f_zero.q.val;
+ }
+ private static int test_4_3(int num)
+ {
+ return BB.f_init.q.val < num + 1 ? 100 : -1;
+ }
+ private static int test_4_4(int num)
+ {
+ return (BB.f_init.q.val > BB.f_zero.q.val ? 1 : 0) + 99;
+ }
+ private static int test_4_5(int num)
+ {
+ return (BB.f_init.q.val ^ BB.f_zero.q.val) | num;
+ }
+ private static int test_4_6(int num)
+ {
+ BB.f_zero.q.val |= BB.f_init.q.val;
+ return BB.f_zero.q.val & num;
+ }
+ private static int test_4_7(int num)
+ {
+ return BB.f_init.q.val >> BB.f_zero.q.val;
+ }
+ private static int test_4_8(int num)
+ {
+ return AA.a_init[BB.f_init.q.val].q.val;
+ }
+ private static int test_4_9(int num)
+ {
+ return AA.aa_init[num - 100, (BB.f_init.q.val | 1) - 2, 1 + BB.f_zero.q.val].q.val;
+ }
+ private static int test_4_10(int num)
+ {
+ object bb = BB.f_init.q.val;
+ return (int)bb;
+ }
+ private static int test_4_11(int num)
+ {
+ double dbl = BB.f_init.q.val;
+ return (int)dbl;
+ }
+ private static int test_4_12(int num)
+ {
+ return AA.call_target(BB.f_init.q).val;
+ }
+ private static int test_4_13(int num)
+ {
+ return AA.call_target_ref(ref BB.f_init.q).val;
+ }
+ private static int test_4_14(int num)
+ {
+ return BB.f_init.q.ret_code();
+ }
+ private static int test_5_0(int num)
+ {
+ return ((AA)AA.b_init).q.val;
+ }
+ private static int test_6_0(int num, TypedReference tr_init)
+ {
+ return __refvalue(tr_init, AA).q.val;
+ }
+
+ private static unsafe int Main()
+ {
+ AA.reset();
+ if (test_0_0(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_0() failed.");
+ return 101;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_1(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_1() failed.");
+ return 102;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_2(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_2() failed.");
+ return 103;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_3(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_3() failed.");
+ return 104;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_4(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_4() failed.");
+ return 105;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_5(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_5() failed.");
+ return 106;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_6(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_6() failed.");
+ return 107;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_7(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_7() failed.");
+ return 108;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_8(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_8() failed.");
+ return 109;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_9(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_9() failed.");
+ return 110;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_10(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_10() failed.");
+ return 111;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_11(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_11() failed.");
+ return 112;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_12(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_12() failed.");
+ return 113;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_13(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_13() failed.");
+ return 114;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_14(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_14() failed.");
+ return 115;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_0(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_0() failed.");
+ return 116;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_1(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_1() failed.");
+ return 117;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_2(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_2() failed.");
+ return 118;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_3(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_3() failed.");
+ return 119;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_4(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_4() failed.");
+ return 120;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_5(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_5() failed.");
+ return 121;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_6(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_6() failed.");
+ return 122;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_7(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_7() failed.");
+ return 123;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_8(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_8() failed.");
+ return 124;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_9(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_9() failed.");
+ return 125;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_10(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_10() failed.");
+ return 126;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_11(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_11() failed.");
+ return 127;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_12(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_12() failed.");
+ return 128;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_13(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_13() failed.");
+ return 129;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_14(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_14() failed.");
+ return 130;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_0(100) != 100)
+ {
+ Console.WriteLine("test_2_0() failed.");
+ return 131;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_1(100) != 100)
+ {
+ Console.WriteLine("test_2_1() failed.");
+ return 132;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_2(100) != 100)
+ {
+ Console.WriteLine("test_2_2() failed.");
+ return 133;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_3(100) != 100)
+ {
+ Console.WriteLine("test_2_3() failed.");
+ return 134;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_4(100) != 100)
+ {
+ Console.WriteLine("test_2_4() failed.");
+ return 135;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_5(100) != 100)
+ {
+ Console.WriteLine("test_2_5() failed.");
+ return 136;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_6(100) != 100)
+ {
+ Console.WriteLine("test_2_6() failed.");
+ return 137;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_7(100) != 100)
+ {
+ Console.WriteLine("test_2_7() failed.");
+ return 138;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_8(100) != 100)
+ {
+ Console.WriteLine("test_2_8() failed.");
+ return 139;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_9(100) != 100)
+ {
+ Console.WriteLine("test_2_9() failed.");
+ return 140;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_10(100) != 100)
+ {
+ Console.WriteLine("test_2_10() failed.");
+ return 141;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_11(100) != 100)
+ {
+ Console.WriteLine("test_2_11() failed.");
+ return 142;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_12(100) != 100)
+ {
+ Console.WriteLine("test_2_12() failed.");
+ return 143;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_13(100) != 100)
+ {
+ Console.WriteLine("test_2_13() failed.");
+ return 144;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_14(100) != 100)
+ {
+ Console.WriteLine("test_2_14() failed.");
+ return 145;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_0(100) != 100)
+ {
+ Console.WriteLine("test_3_0() failed.");
+ return 146;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_1(100) != 100)
+ {
+ Console.WriteLine("test_3_1() failed.");
+ return 147;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_2(100) != 100)
+ {
+ Console.WriteLine("test_3_2() failed.");
+ return 148;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_3(100) != 100)
+ {
+ Console.WriteLine("test_3_3() failed.");
+ return 149;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_4(100) != 100)
+ {
+ Console.WriteLine("test_3_4() failed.");
+ return 150;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_5(100) != 100)
+ {
+ Console.WriteLine("test_3_5() failed.");
+ return 151;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_6(100) != 100)
+ {
+ Console.WriteLine("test_3_6() failed.");
+ return 152;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_7(100) != 100)
+ {
+ Console.WriteLine("test_3_7() failed.");
+ return 153;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_8(100) != 100)
+ {
+ Console.WriteLine("test_3_8() failed.");
+ return 154;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_9(100) != 100)
+ {
+ Console.WriteLine("test_3_9() failed.");
+ return 155;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_10(100) != 100)
+ {
+ Console.WriteLine("test_3_10() failed.");
+ return 156;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_11(100) != 100)
+ {
+ Console.WriteLine("test_3_11() failed.");
+ return 157;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_12(100) != 100)
+ {
+ Console.WriteLine("test_3_12() failed.");
+ return 158;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_13(100) != 100)
+ {
+ Console.WriteLine("test_3_13() failed.");
+ return 159;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_14(100) != 100)
+ {
+ Console.WriteLine("test_3_14() failed.");
+ return 160;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_0(100) != 100)
+ {
+ Console.WriteLine("test_4_0() failed.");
+ return 161;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_1(100) != 100)
+ {
+ Console.WriteLine("test_4_1() failed.");
+ return 162;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_2(100) != 100)
+ {
+ Console.WriteLine("test_4_2() failed.");
+ return 163;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_3(100) != 100)
+ {
+ Console.WriteLine("test_4_3() failed.");
+ return 164;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_4(100) != 100)
+ {
+ Console.WriteLine("test_4_4() failed.");
+ return 165;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_5(100) != 100)
+ {
+ Console.WriteLine("test_4_5() failed.");
+ return 166;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_6(100) != 100)
+ {
+ Console.WriteLine("test_4_6() failed.");
+ return 167;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_7(100) != 100)
+ {
+ Console.WriteLine("test_4_7() failed.");
+ return 168;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_8(100) != 100)
+ {
+ Console.WriteLine("test_4_8() failed.");
+ return 169;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_9(100) != 100)
+ {
+ Console.WriteLine("test_4_9() failed.");
+ return 170;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_10(100) != 100)
+ {
+ Console.WriteLine("test_4_10() failed.");
+ return 171;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_11(100) != 100)
+ {
+ Console.WriteLine("test_4_11() failed.");
+ return 172;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_12(100) != 100)
+ {
+ Console.WriteLine("test_4_12() failed.");
+ return 173;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_13(100) != 100)
+ {
+ Console.WriteLine("test_4_13() failed.");
+ return 174;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_14(100) != 100)
+ {
+ Console.WriteLine("test_4_14() failed.");
+ return 175;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_5_0(100) != 100)
+ {
+ Console.WriteLine("test_5_0() failed.");
+ return 176;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_6_0(100, __makeref(AA._init)) != 100)
+ {
+ Console.WriteLine("test_6_0() failed.");
+ return 177;
+ }
+ AA.verify_all(); Console.WriteLine("All tests passed.");
+ return 100;
+ }
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/body_safe_byte.cs b/tests/src/JIT/Methodical/explicit/coverage/body_safe_byte.cs
new file mode 100644
index 0000000000..1d02f9b9e9
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/body_safe_byte.cs
@@ -0,0 +1,969 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+
+internal class TestApp
+{
+ private static byte test_0_0(byte num, AA init, AA zero)
+ {
+ return init.q;
+ }
+ private static byte test_0_1(byte num, AA init, AA zero)
+ {
+ zero.q = num;
+ return zero.q;
+ }
+ private static byte test_0_2(byte num, AA init, AA zero)
+ {
+ return (byte)(init.q + zero.q);
+ }
+ private static byte test_0_3(byte num, AA init, AA zero)
+ {
+ return (byte)checked(init.q - zero.q);
+ }
+ private static byte test_0_4(byte num, AA init, AA zero)
+ {
+ zero.q += num; return zero.q;
+ }
+ private static byte test_0_5(byte num, AA init, AA zero)
+ {
+ zero.q += init.q; return zero.q;
+ }
+ private static byte test_0_6(byte num, AA init, AA zero)
+ {
+ if (init.q == num)
+ return 100;
+ else
+ return zero.q;
+ }
+ private static byte test_0_7(byte num, AA init, AA zero)
+ {
+ return (byte)(init.q < num + 1 ? 100 : -1);
+ }
+ private static byte test_0_8(byte num, AA init, AA zero)
+ {
+ return (byte)((init.q > zero.q ? 1 : 0) + 99);
+ }
+ private static byte test_0_9(byte num, AA init, AA zero)
+ {
+ return (byte)((init.q ^ zero.q) | num);
+ }
+ private static byte test_0_10(byte num, AA init, AA zero)
+ {
+ zero.q |= init.q;
+ return (byte)(zero.q & num);
+ }
+ private static byte test_0_11(byte num, AA init, AA zero)
+ {
+ return (byte)(init.q >> zero.q);
+ }
+ private static byte test_0_12(byte num, AA init, AA zero)
+ {
+ return AA.a_init[init.q].q;
+ }
+ private static byte test_0_13(byte num, AA init, AA zero)
+ {
+ return AA.aa_init[num - 100, (init.q | 1) - 2, 1 + zero.q].q;
+ }
+ private static byte test_0_14(byte num, AA init, AA zero)
+ {
+ object bb = init.q;
+ return (byte)bb;
+ }
+ private static byte test_0_15(byte num, AA init, AA zero)
+ {
+ double dbl = init.q;
+ return (byte)dbl;
+ }
+ private static byte test_0_16(byte num, AA init, AA zero)
+ {
+ return AA.call_target(init.q);
+ }
+ private static byte test_0_17(byte num, AA init, AA zero)
+ {
+ return AA.call_target_ref(ref init.q);
+ }
+ private static byte test_1_0(byte num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q;
+ }
+ private static byte test_1_1(byte num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q = num;
+ return r_zero.q;
+ }
+ private static byte test_1_2(byte num, ref AA r_init, ref AA r_zero)
+ {
+ return (byte)(r_init.q + r_zero.q);
+ }
+ private static byte test_1_3(byte num, ref AA r_init, ref AA r_zero)
+ {
+ return (byte)checked(r_init.q - r_zero.q);
+ }
+ private static byte test_1_4(byte num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q += num; return r_zero.q;
+ }
+ private static byte test_1_5(byte num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q += r_init.q; return r_zero.q;
+ }
+ private static byte test_1_6(byte num, ref AA r_init, ref AA r_zero)
+ {
+ if (r_init.q == num)
+ return 100;
+ else
+ return r_zero.q;
+ }
+ private static byte test_1_7(byte num, ref AA r_init, ref AA r_zero)
+ {
+ return (byte)(r_init.q < num + 1 ? 100 : -1);
+ }
+ private static byte test_1_8(byte num, ref AA r_init, ref AA r_zero)
+ {
+ return (byte)((r_init.q > r_zero.q ? 1 : 0) + 99);
+ }
+ private static byte test_1_9(byte num, ref AA r_init, ref AA r_zero)
+ {
+ return (byte)((r_init.q ^ r_zero.q) | num);
+ }
+ private static byte test_1_10(byte num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q |= r_init.q;
+ return (byte)(r_zero.q & num);
+ }
+ private static byte test_1_11(byte num, ref AA r_init, ref AA r_zero)
+ {
+ return (byte)(r_init.q >> r_zero.q);
+ }
+ private static byte test_1_12(byte num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.a_init[r_init.q].q;
+ }
+ private static byte test_1_13(byte num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.aa_init[num - 100, (r_init.q | 1) - 2, 1 + r_zero.q].q;
+ }
+ private static byte test_1_14(byte num, ref AA r_init, ref AA r_zero)
+ {
+ object bb = r_init.q;
+ return (byte)bb;
+ }
+ private static byte test_1_15(byte num, ref AA r_init, ref AA r_zero)
+ {
+ double dbl = r_init.q;
+ return (byte)dbl;
+ }
+ private static byte test_1_16(byte num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.call_target(r_init.q);
+ }
+ private static byte test_1_17(byte num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.call_target_ref(ref r_init.q);
+ }
+ private static byte test_2_0(byte num)
+ {
+ return AA.a_init[num].q;
+ }
+ private static byte test_2_1(byte num)
+ {
+ AA.a_zero[num].q = num;
+ return AA.a_zero[num].q;
+ }
+ private static byte test_2_2(byte num)
+ {
+ return (byte)(AA.a_init[num].q + AA.a_zero[num].q);
+ }
+ private static byte test_2_3(byte num)
+ {
+ return (byte)checked(AA.a_init[num].q - AA.a_zero[num].q);
+ }
+ private static byte test_2_4(byte num)
+ {
+ AA.a_zero[num].q += num; return AA.a_zero[num].q;
+ }
+ private static byte test_2_5(byte num)
+ {
+ AA.a_zero[num].q += AA.a_init[num].q; return AA.a_zero[num].q;
+ }
+ private static byte test_2_6(byte num)
+ {
+ if (AA.a_init[num].q == num)
+ return 100;
+ else
+ return AA.a_zero[num].q;
+ }
+ private static byte test_2_7(byte num)
+ {
+ return (byte)(AA.a_init[num].q < num + 1 ? 100 : -1);
+ }
+ private static byte test_2_8(byte num)
+ {
+ return (byte)((AA.a_init[num].q > AA.a_zero[num].q ? 1 : 0) + 99);
+ }
+ private static byte test_2_9(byte num)
+ {
+ return (byte)((AA.a_init[num].q ^ AA.a_zero[num].q) | num);
+ }
+ private static byte test_2_10(byte num)
+ {
+ AA.a_zero[num].q |= AA.a_init[num].q;
+ return (byte)(AA.a_zero[num].q & num);
+ }
+ private static byte test_2_11(byte num)
+ {
+ return (byte)(AA.a_init[num].q >> AA.a_zero[num].q);
+ }
+ private static byte test_2_12(byte num)
+ {
+ return AA.a_init[AA.a_init[num].q].q;
+ }
+ private static byte test_2_13(byte num)
+ {
+ return AA.aa_init[num - 100, (AA.a_init[num].q | 1) - 2, 1 + AA.a_zero[num].q].q;
+ }
+ private static byte test_2_14(byte num)
+ {
+ object bb = AA.a_init[num].q;
+ return (byte)bb;
+ }
+ private static byte test_2_15(byte num)
+ {
+ double dbl = AA.a_init[num].q;
+ return (byte)dbl;
+ }
+ private static byte test_2_16(byte num)
+ {
+ return AA.call_target(AA.a_init[num].q);
+ }
+ private static byte test_2_17(byte num)
+ {
+ return AA.call_target_ref(ref AA.a_init[num].q);
+ }
+ private static byte test_3_0(byte num)
+ {
+ return AA.aa_init[0, num - 1, num / 100].q;
+ }
+ private static byte test_3_1(byte num)
+ {
+ AA.aa_zero[0, num - 1, num / 100].q = num;
+ return AA.aa_zero[0, num - 1, num / 100].q;
+ }
+ private static byte test_3_2(byte num)
+ {
+ return (byte)(AA.aa_init[0, num - 1, num / 100].q + AA.aa_zero[0, num - 1, num / 100].q);
+ }
+ private static byte test_3_3(byte num)
+ {
+ return (byte)checked(AA.aa_init[0, num - 1, num / 100].q - AA.aa_zero[0, num - 1, num / 100].q);
+ }
+ private static byte test_3_4(byte num)
+ {
+ AA.aa_zero[0, num - 1, num / 100].q += num; return AA.aa_zero[0, num - 1, num / 100].q;
+ }
+ private static byte test_3_5(byte num)
+ {
+ AA.aa_zero[0, num - 1, num / 100].q += AA.aa_init[0, num - 1, num / 100].q; return AA.aa_zero[0, num - 1, num / 100].q;
+ }
+ private static byte test_3_6(byte num)
+ {
+ if (AA.aa_init[0, num - 1, num / 100].q == num)
+ return 100;
+ else
+ return AA.aa_zero[0, num - 1, num / 100].q;
+ }
+ private static byte test_3_7(byte num)
+ {
+ return (byte)(AA.aa_init[0, num - 1, num / 100].q < num + 1 ? 100 : -1);
+ }
+ private static byte test_3_8(byte num)
+ {
+ return (byte)((AA.aa_init[0, num - 1, num / 100].q > AA.aa_zero[0, num - 1, num / 100].q ? 1 : 0) + 99);
+ }
+ private static byte test_3_9(byte num)
+ {
+ return (byte)((AA.aa_init[0, num - 1, num / 100].q ^ AA.aa_zero[0, num - 1, num / 100].q) | num);
+ }
+ private static byte test_3_10(byte num)
+ {
+ AA.aa_zero[0, num - 1, num / 100].q |= AA.aa_init[0, num - 1, num / 100].q;
+ return (byte)(AA.aa_zero[0, num - 1, num / 100].q & num);
+ }
+ private static byte test_3_11(byte num)
+ {
+ return (byte)(AA.aa_init[0, num - 1, num / 100].q >> AA.aa_zero[0, num - 1, num / 100].q);
+ }
+ private static byte test_3_12(byte num)
+ {
+ return AA.a_init[AA.aa_init[0, num - 1, num / 100].q].q;
+ }
+ private static byte test_3_13(byte num)
+ {
+ return AA.aa_init[num - 100, (AA.aa_init[0, num - 1, num / 100].q | 1) - 2, 1 + AA.aa_zero[0, num - 1, num / 100].q].q;
+ }
+ private static byte test_3_14(byte num)
+ {
+ object bb = AA.aa_init[0, num - 1, num / 100].q;
+ return (byte)bb;
+ }
+ private static byte test_3_15(byte num)
+ {
+ double dbl = AA.aa_init[0, num - 1, num / 100].q;
+ return (byte)dbl;
+ }
+ private static byte test_3_16(byte num)
+ {
+ return AA.call_target(AA.aa_init[0, num - 1, num / 100].q);
+ }
+ private static byte test_3_17(byte num)
+ {
+ return AA.call_target_ref(ref AA.aa_init[0, num - 1, num / 100].q);
+ }
+ private static byte test_4_0(byte num)
+ {
+ return BB.f_init.q;
+ }
+ private static byte test_4_1(byte num)
+ {
+ BB.f_zero.q = num;
+ return BB.f_zero.q;
+ }
+ private static byte test_4_2(byte num)
+ {
+ return (byte)(BB.f_init.q + BB.f_zero.q);
+ }
+ private static byte test_4_3(byte num)
+ {
+ return (byte)checked(BB.f_init.q - BB.f_zero.q);
+ }
+ private static byte test_4_4(byte num)
+ {
+ BB.f_zero.q += num; return BB.f_zero.q;
+ }
+ private static byte test_4_5(byte num)
+ {
+ BB.f_zero.q += BB.f_init.q; return BB.f_zero.q;
+ }
+ private static byte test_4_6(byte num)
+ {
+ if (BB.f_init.q == num)
+ return 100;
+ else
+ return BB.f_zero.q;
+ }
+ private static byte test_4_7(byte num)
+ {
+ return (byte)(BB.f_init.q < num + 1 ? 100 : -1);
+ }
+ private static byte test_4_8(byte num)
+ {
+ return (byte)((BB.f_init.q > BB.f_zero.q ? 1 : 0) + 99);
+ }
+ private static byte test_4_9(byte num)
+ {
+ return (byte)((BB.f_init.q ^ BB.f_zero.q) | num);
+ }
+ private static byte test_4_10(byte num)
+ {
+ BB.f_zero.q |= BB.f_init.q;
+ return (byte)(BB.f_zero.q & num);
+ }
+ private static byte test_4_11(byte num)
+ {
+ return (byte)(BB.f_init.q >> BB.f_zero.q);
+ }
+ private static byte test_4_12(byte num)
+ {
+ return AA.a_init[BB.f_init.q].q;
+ }
+ private static byte test_4_13(byte num)
+ {
+ return AA.aa_init[num - 100, (BB.f_init.q | 1) - 2, 1 + BB.f_zero.q].q;
+ }
+ private static byte test_4_14(byte num)
+ {
+ object bb = BB.f_init.q;
+ return (byte)bb;
+ }
+ private static byte test_4_15(byte num)
+ {
+ double dbl = BB.f_init.q;
+ return (byte)dbl;
+ }
+ private static byte test_4_16(byte num)
+ {
+ return AA.call_target(BB.f_init.q);
+ }
+ private static byte test_4_17(byte num)
+ {
+ return AA.call_target_ref(ref BB.f_init.q);
+ }
+ private static byte test_5_0(byte num)
+ {
+ return ((AA)AA.b_init).q;
+ }
+ private static byte test_6_0(byte num, TypedReference tr_init)
+ {
+ return __refvalue(tr_init, AA).q;
+ }
+
+ private static unsafe int Main()
+ {
+ AA.reset();
+ if (test_0_0(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_0() failed.");
+ return 101;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_1(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_1() failed.");
+ return 102;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_2(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_2() failed.");
+ return 103;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_3(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_3() failed.");
+ return 104;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_4(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_4() failed.");
+ return 105;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_5(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_5() failed.");
+ return 106;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_6(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_6() failed.");
+ return 107;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_7(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_7() failed.");
+ return 108;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_8(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_8() failed.");
+ return 109;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_9(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_9() failed.");
+ return 110;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_10(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_10() failed.");
+ return 111;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_11(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_11() failed.");
+ return 112;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_12(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_12() failed.");
+ return 113;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_13(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_13() failed.");
+ return 114;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_14(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_14() failed.");
+ return 115;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_15(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_15() failed.");
+ return 116;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_16(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_16() failed.");
+ return 117;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_17(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_17() failed.");
+ return 118;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_0(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_0() failed.");
+ return 119;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_1(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_1() failed.");
+ return 120;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_2(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_2() failed.");
+ return 121;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_3(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_3() failed.");
+ return 122;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_4(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_4() failed.");
+ return 123;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_5(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_5() failed.");
+ return 124;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_6(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_6() failed.");
+ return 125;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_7(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_7() failed.");
+ return 126;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_8(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_8() failed.");
+ return 127;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_9(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_9() failed.");
+ return 128;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_10(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_10() failed.");
+ return 129;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_11(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_11() failed.");
+ return 130;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_12(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_12() failed.");
+ return 131;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_13(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_13() failed.");
+ return 132;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_14(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_14() failed.");
+ return 133;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_15(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_15() failed.");
+ return 134;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_16(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_16() failed.");
+ return 135;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_17(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_17() failed.");
+ return 136;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_0(100) != 100)
+ {
+ Console.WriteLine("test_2_0() failed.");
+ return 137;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_1(100) != 100)
+ {
+ Console.WriteLine("test_2_1() failed.");
+ return 138;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_2(100) != 100)
+ {
+ Console.WriteLine("test_2_2() failed.");
+ return 139;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_3(100) != 100)
+ {
+ Console.WriteLine("test_2_3() failed.");
+ return 140;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_4(100) != 100)
+ {
+ Console.WriteLine("test_2_4() failed.");
+ return 141;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_5(100) != 100)
+ {
+ Console.WriteLine("test_2_5() failed.");
+ return 142;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_6(100) != 100)
+ {
+ Console.WriteLine("test_2_6() failed.");
+ return 143;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_7(100) != 100)
+ {
+ Console.WriteLine("test_2_7() failed.");
+ return 144;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_8(100) != 100)
+ {
+ Console.WriteLine("test_2_8() failed.");
+ return 145;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_9(100) != 100)
+ {
+ Console.WriteLine("test_2_9() failed.");
+ return 146;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_10(100) != 100)
+ {
+ Console.WriteLine("test_2_10() failed.");
+ return 147;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_11(100) != 100)
+ {
+ Console.WriteLine("test_2_11() failed.");
+ return 148;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_12(100) != 100)
+ {
+ Console.WriteLine("test_2_12() failed.");
+ return 149;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_13(100) != 100)
+ {
+ Console.WriteLine("test_2_13() failed.");
+ return 150;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_14(100) != 100)
+ {
+ Console.WriteLine("test_2_14() failed.");
+ return 151;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_15(100) != 100)
+ {
+ Console.WriteLine("test_2_15() failed.");
+ return 152;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_16(100) != 100)
+ {
+ Console.WriteLine("test_2_16() failed.");
+ return 153;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_17(100) != 100)
+ {
+ Console.WriteLine("test_2_17() failed.");
+ return 154;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_0(100) != 100)
+ {
+ Console.WriteLine("test_3_0() failed.");
+ return 155;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_1(100) != 100)
+ {
+ Console.WriteLine("test_3_1() failed.");
+ return 156;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_2(100) != 100)
+ {
+ Console.WriteLine("test_3_2() failed.");
+ return 157;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_3(100) != 100)
+ {
+ Console.WriteLine("test_3_3() failed.");
+ return 158;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_4(100) != 100)
+ {
+ Console.WriteLine("test_3_4() failed.");
+ return 159;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_5(100) != 100)
+ {
+ Console.WriteLine("test_3_5() failed.");
+ return 160;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_6(100) != 100)
+ {
+ Console.WriteLine("test_3_6() failed.");
+ return 161;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_7(100) != 100)
+ {
+ Console.WriteLine("test_3_7() failed.");
+ return 162;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_8(100) != 100)
+ {
+ Console.WriteLine("test_3_8() failed.");
+ return 163;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_9(100) != 100)
+ {
+ Console.WriteLine("test_3_9() failed.");
+ return 164;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_10(100) != 100)
+ {
+ Console.WriteLine("test_3_10() failed.");
+ return 165;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_11(100) != 100)
+ {
+ Console.WriteLine("test_3_11() failed.");
+ return 166;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_12(100) != 100)
+ {
+ Console.WriteLine("test_3_12() failed.");
+ return 167;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_13(100) != 100)
+ {
+ Console.WriteLine("test_3_13() failed.");
+ return 168;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_14(100) != 100)
+ {
+ Console.WriteLine("test_3_14() failed.");
+ return 169;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_15(100) != 100)
+ {
+ Console.WriteLine("test_3_15() failed.");
+ return 170;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_16(100) != 100)
+ {
+ Console.WriteLine("test_3_16() failed.");
+ return 171;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_17(100) != 100)
+ {
+ Console.WriteLine("test_3_17() failed.");
+ return 172;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_0(100) != 100)
+ {
+ Console.WriteLine("test_4_0() failed.");
+ return 173;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_1(100) != 100)
+ {
+ Console.WriteLine("test_4_1() failed.");
+ return 174;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_2(100) != 100)
+ {
+ Console.WriteLine("test_4_2() failed.");
+ return 175;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_3(100) != 100)
+ {
+ Console.WriteLine("test_4_3() failed.");
+ return 176;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_4(100) != 100)
+ {
+ Console.WriteLine("test_4_4() failed.");
+ return 177;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_5(100) != 100)
+ {
+ Console.WriteLine("test_4_5() failed.");
+ return 178;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_6(100) != 100)
+ {
+ Console.WriteLine("test_4_6() failed.");
+ return 179;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_7(100) != 100)
+ {
+ Console.WriteLine("test_4_7() failed.");
+ return 180;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_8(100) != 100)
+ {
+ Console.WriteLine("test_4_8() failed.");
+ return 181;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_9(100) != 100)
+ {
+ Console.WriteLine("test_4_9() failed.");
+ return 182;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_10(100) != 100)
+ {
+ Console.WriteLine("test_4_10() failed.");
+ return 183;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_11(100) != 100)
+ {
+ Console.WriteLine("test_4_11() failed.");
+ return 184;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_12(100) != 100)
+ {
+ Console.WriteLine("test_4_12() failed.");
+ return 185;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_13(100) != 100)
+ {
+ Console.WriteLine("test_4_13() failed.");
+ return 186;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_14(100) != 100)
+ {
+ Console.WriteLine("test_4_14() failed.");
+ return 187;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_15(100) != 100)
+ {
+ Console.WriteLine("test_4_15() failed.");
+ return 188;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_16(100) != 100)
+ {
+ Console.WriteLine("test_4_16() failed.");
+ return 189;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_17(100) != 100)
+ {
+ Console.WriteLine("test_4_17() failed.");
+ return 190;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_5_0(100) != 100)
+ {
+ Console.WriteLine("test_5_0() failed.");
+ return 191;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_6_0(100, __makeref(AA._init)) != 100)
+ {
+ Console.WriteLine("test_6_0() failed.");
+ return 192;
+ }
+ AA.verify_all(); Console.WriteLine("All tests passed.");
+ return 100;
+ }
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/body_safe_double.cs b/tests/src/JIT/Methodical/explicit/coverage/body_safe_double.cs
new file mode 100644
index 0000000000..89036d6219
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/body_safe_double.cs
@@ -0,0 +1,714 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+
+internal class TestApp
+{
+ private static double test_0_0(double num, AA init, AA zero)
+ {
+ return init.q;
+ }
+ private static double test_0_1(double num, AA init, AA zero)
+ {
+ zero.q = num;
+ return zero.q;
+ }
+ private static double test_0_2(double num, AA init, AA zero)
+ {
+ return init.q + zero.q;
+ }
+ private static double test_0_3(double num, AA init, AA zero)
+ {
+ return checked(init.q - zero.q);
+ }
+ private static double test_0_4(double num, AA init, AA zero)
+ {
+ zero.q += num; return zero.q;
+ }
+ private static double test_0_5(double num, AA init, AA zero)
+ {
+ zero.q += init.q; return zero.q;
+ }
+ private static double test_0_6(double num, AA init, AA zero)
+ {
+ if (init.q == num)
+ return 100;
+ else
+ return zero.q;
+ }
+ private static double test_0_7(double num, AA init, AA zero)
+ {
+ return init.q < num + 1 ? 100 : -1;
+ }
+ private static double test_0_8(double num, AA init, AA zero)
+ {
+ return (init.q > zero.q ? 1 : 0) + 99;
+ }
+ private static double test_0_9(double num, AA init, AA zero)
+ {
+ object bb = init.q;
+ return (double)bb;
+ }
+ private static double test_0_10(double num, AA init, AA zero)
+ {
+ double dbl = init.q;
+ return (double)dbl;
+ }
+ private static double test_0_11(double num, AA init, AA zero)
+ {
+ return AA.call_target(init.q);
+ }
+ private static double test_0_12(double num, AA init, AA zero)
+ {
+ return AA.call_target_ref(ref init.q);
+ }
+ private static double test_1_0(double num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q;
+ }
+ private static double test_1_1(double num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q = num;
+ return r_zero.q;
+ }
+ private static double test_1_2(double num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q + r_zero.q;
+ }
+ private static double test_1_3(double num, ref AA r_init, ref AA r_zero)
+ {
+ return checked(r_init.q - r_zero.q);
+ }
+ private static double test_1_4(double num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q += num; return r_zero.q;
+ }
+ private static double test_1_5(double num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q += r_init.q; return r_zero.q;
+ }
+ private static double test_1_6(double num, ref AA r_init, ref AA r_zero)
+ {
+ if (r_init.q == num)
+ return 100;
+ else
+ return r_zero.q;
+ }
+ private static double test_1_7(double num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q < num + 1 ? 100 : -1;
+ }
+ private static double test_1_8(double num, ref AA r_init, ref AA r_zero)
+ {
+ return (r_init.q > r_zero.q ? 1 : 0) + 99;
+ }
+ private static double test_1_9(double num, ref AA r_init, ref AA r_zero)
+ {
+ object bb = r_init.q;
+ return (double)bb;
+ }
+ private static double test_1_10(double num, ref AA r_init, ref AA r_zero)
+ {
+ double dbl = r_init.q;
+ return (double)dbl;
+ }
+ private static double test_1_11(double num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.call_target(r_init.q);
+ }
+ private static double test_1_12(double num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.call_target_ref(ref r_init.q);
+ }
+ private static double test_2_0(double num)
+ {
+ return AA.a_init[(int)num].q;
+ }
+ private static double test_2_1(double num)
+ {
+ AA.a_zero[(int)num].q = num;
+ return AA.a_zero[(int)num].q;
+ }
+ private static double test_2_2(double num)
+ {
+ return AA.a_init[(int)num].q + AA.a_zero[(int)num].q;
+ }
+ private static double test_2_3(double num)
+ {
+ return checked(AA.a_init[(int)num].q - AA.a_zero[(int)num].q);
+ }
+ private static double test_2_4(double num)
+ {
+ AA.a_zero[(int)num].q += num; return AA.a_zero[(int)num].q;
+ }
+ private static double test_2_5(double num)
+ {
+ AA.a_zero[(int)num].q += AA.a_init[(int)num].q; return AA.a_zero[(int)num].q;
+ }
+ private static double test_2_6(double num)
+ {
+ if (AA.a_init[(int)num].q == num)
+ return 100;
+ else
+ return AA.a_zero[(int)num].q;
+ }
+ private static double test_2_7(double num)
+ {
+ return AA.a_init[(int)num].q < num + 1 ? 100 : -1;
+ }
+ private static double test_2_8(double num)
+ {
+ return (AA.a_init[(int)num].q > AA.a_zero[(int)num].q ? 1 : 0) + 99;
+ }
+ private static double test_2_9(double num)
+ {
+ object bb = AA.a_init[(int)num].q;
+ return (double)bb;
+ }
+ private static double test_2_10(double num)
+ {
+ double dbl = AA.a_init[(int)num].q;
+ return (double)dbl;
+ }
+ private static double test_2_11(double num)
+ {
+ return AA.call_target(AA.a_init[(int)num].q);
+ }
+ private static double test_2_12(double num)
+ {
+ return AA.call_target_ref(ref AA.a_init[(int)num].q);
+ }
+ private static double test_3_0(double num)
+ {
+ return AA.aa_init[0, (int)num - 1, (int)num / 100].q;
+ }
+ private static double test_3_1(double num)
+ {
+ AA.aa_zero[0, (int)num - 1, (int)num / 100].q = num;
+ return AA.aa_zero[0, (int)num - 1, (int)num / 100].q;
+ }
+ private static double test_3_2(double num)
+ {
+ return AA.aa_init[0, (int)num - 1, (int)num / 100].q + AA.aa_zero[0, (int)num - 1, (int)num / 100].q;
+ }
+ private static double test_3_3(double num)
+ {
+ return checked(AA.aa_init[0, (int)num - 1, (int)num / 100].q - AA.aa_zero[0, (int)num - 1, (int)num / 100].q);
+ }
+ private static double test_3_4(double num)
+ {
+ AA.aa_zero[0, (int)num - 1, (int)num / 100].q += num; return AA.aa_zero[0, (int)num - 1, (int)num / 100].q;
+ }
+ private static double test_3_5(double num)
+ {
+ AA.aa_zero[0, (int)num - 1, (int)num / 100].q += AA.aa_init[0, (int)num - 1, (int)num / 100].q; return AA.aa_zero[0, (int)num - 1, (int)num / 100].q;
+ }
+ private static double test_3_6(double num)
+ {
+ if (AA.aa_init[0, (int)num - 1, (int)num / 100].q == num)
+ return 100;
+ else
+ return AA.aa_zero[0, (int)num - 1, (int)num / 100].q;
+ }
+ private static double test_3_7(double num)
+ {
+ return AA.aa_init[0, (int)num - 1, (int)num / 100].q < num + 1 ? 100 : -1;
+ }
+ private static double test_3_8(double num)
+ {
+ return (AA.aa_init[0, (int)num - 1, (int)num / 100].q > AA.aa_zero[0, (int)num - 1, (int)num / 100].q ? 1 : 0) + 99;
+ }
+ private static double test_3_9(double num)
+ {
+ object bb = AA.aa_init[0, (int)num - 1, (int)num / 100].q;
+ return (double)bb;
+ }
+ private static double test_3_10(double num)
+ {
+ double dbl = AA.aa_init[0, (int)num - 1, (int)num / 100].q;
+ return (double)dbl;
+ }
+ private static double test_3_11(double num)
+ {
+ return AA.call_target(AA.aa_init[0, (int)num - 1, (int)num / 100].q);
+ }
+ private static double test_3_12(double num)
+ {
+ return AA.call_target_ref(ref AA.aa_init[0, (int)num - 1, (int)num / 100].q);
+ }
+ private static double test_4_0(double num)
+ {
+ return BB.f_init.q;
+ }
+ private static double test_4_1(double num)
+ {
+ BB.f_zero.q = num;
+ return BB.f_zero.q;
+ }
+ private static double test_4_2(double num)
+ {
+ return BB.f_init.q + BB.f_zero.q;
+ }
+ private static double test_4_3(double num)
+ {
+ return checked(BB.f_init.q - BB.f_zero.q);
+ }
+ private static double test_4_4(double num)
+ {
+ BB.f_zero.q += num; return BB.f_zero.q;
+ }
+ private static double test_4_5(double num)
+ {
+ BB.f_zero.q += BB.f_init.q; return BB.f_zero.q;
+ }
+ private static double test_4_6(double num)
+ {
+ if (BB.f_init.q == num)
+ return 100;
+ else
+ return BB.f_zero.q;
+ }
+ private static double test_4_7(double num)
+ {
+ return BB.f_init.q < num + 1 ? 100 : -1;
+ }
+ private static double test_4_8(double num)
+ {
+ return (BB.f_init.q > BB.f_zero.q ? 1 : 0) + 99;
+ }
+ private static double test_4_9(double num)
+ {
+ object bb = BB.f_init.q;
+ return (double)bb;
+ }
+ private static double test_4_10(double num)
+ {
+ double dbl = BB.f_init.q;
+ return (double)dbl;
+ }
+ private static double test_4_11(double num)
+ {
+ return AA.call_target(BB.f_init.q);
+ }
+ private static double test_4_12(double num)
+ {
+ return AA.call_target_ref(ref BB.f_init.q);
+ }
+ private static double test_5_0(double num)
+ {
+ return ((AA)AA.b_init).q;
+ }
+ private static double test_6_0(double num, TypedReference tr_init)
+ {
+ return __refvalue(tr_init, AA).q;
+ }
+
+ private static unsafe int Main()
+ {
+ AA.reset();
+ if (test_0_0(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_0() failed.");
+ return 101;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_1(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_1() failed.");
+ return 102;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_2(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_2() failed.");
+ return 103;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_3(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_3() failed.");
+ return 104;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_4(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_4() failed.");
+ return 105;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_5(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_5() failed.");
+ return 106;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_6(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_6() failed.");
+ return 107;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_7(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_7() failed.");
+ return 108;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_8(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_8() failed.");
+ return 109;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_9(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_9() failed.");
+ return 110;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_10(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_10() failed.");
+ return 111;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_11(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_11() failed.");
+ return 112;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_12(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_12() failed.");
+ return 113;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_0(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_0() failed.");
+ return 114;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_1(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_1() failed.");
+ return 115;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_2(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_2() failed.");
+ return 116;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_3(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_3() failed.");
+ return 117;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_4(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_4() failed.");
+ return 118;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_5(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_5() failed.");
+ return 119;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_6(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_6() failed.");
+ return 120;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_7(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_7() failed.");
+ return 121;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_8(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_8() failed.");
+ return 122;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_9(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_9() failed.");
+ return 123;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_10(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_10() failed.");
+ return 124;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_11(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_11() failed.");
+ return 125;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_12(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_12() failed.");
+ return 126;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_0(100) != 100)
+ {
+ Console.WriteLine("test_2_0() failed.");
+ return 127;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_1(100) != 100)
+ {
+ Console.WriteLine("test_2_1() failed.");
+ return 128;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_2(100) != 100)
+ {
+ Console.WriteLine("test_2_2() failed.");
+ return 129;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_3(100) != 100)
+ {
+ Console.WriteLine("test_2_3() failed.");
+ return 130;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_4(100) != 100)
+ {
+ Console.WriteLine("test_2_4() failed.");
+ return 131;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_5(100) != 100)
+ {
+ Console.WriteLine("test_2_5() failed.");
+ return 132;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_6(100) != 100)
+ {
+ Console.WriteLine("test_2_6() failed.");
+ return 133;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_7(100) != 100)
+ {
+ Console.WriteLine("test_2_7() failed.");
+ return 134;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_8(100) != 100)
+ {
+ Console.WriteLine("test_2_8() failed.");
+ return 135;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_9(100) != 100)
+ {
+ Console.WriteLine("test_2_9() failed.");
+ return 136;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_10(100) != 100)
+ {
+ Console.WriteLine("test_2_10() failed.");
+ return 137;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_11(100) != 100)
+ {
+ Console.WriteLine("test_2_11() failed.");
+ return 138;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_12(100) != 100)
+ {
+ Console.WriteLine("test_2_12() failed.");
+ return 139;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_0(100) != 100)
+ {
+ Console.WriteLine("test_3_0() failed.");
+ return 140;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_1(100) != 100)
+ {
+ Console.WriteLine("test_3_1() failed.");
+ return 141;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_2(100) != 100)
+ {
+ Console.WriteLine("test_3_2() failed.");
+ return 142;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_3(100) != 100)
+ {
+ Console.WriteLine("test_3_3() failed.");
+ return 143;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_4(100) != 100)
+ {
+ Console.WriteLine("test_3_4() failed.");
+ return 144;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_5(100) != 100)
+ {
+ Console.WriteLine("test_3_5() failed.");
+ return 145;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_6(100) != 100)
+ {
+ Console.WriteLine("test_3_6() failed.");
+ return 146;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_7(100) != 100)
+ {
+ Console.WriteLine("test_3_7() failed.");
+ return 147;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_8(100) != 100)
+ {
+ Console.WriteLine("test_3_8() failed.");
+ return 148;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_9(100) != 100)
+ {
+ Console.WriteLine("test_3_9() failed.");
+ return 149;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_10(100) != 100)
+ {
+ Console.WriteLine("test_3_10() failed.");
+ return 150;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_11(100) != 100)
+ {
+ Console.WriteLine("test_3_11() failed.");
+ return 151;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_12(100) != 100)
+ {
+ Console.WriteLine("test_3_12() failed.");
+ return 152;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_0(100) != 100)
+ {
+ Console.WriteLine("test_4_0() failed.");
+ return 153;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_1(100) != 100)
+ {
+ Console.WriteLine("test_4_1() failed.");
+ return 154;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_2(100) != 100)
+ {
+ Console.WriteLine("test_4_2() failed.");
+ return 155;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_3(100) != 100)
+ {
+ Console.WriteLine("test_4_3() failed.");
+ return 156;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_4(100) != 100)
+ {
+ Console.WriteLine("test_4_4() failed.");
+ return 157;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_5(100) != 100)
+ {
+ Console.WriteLine("test_4_5() failed.");
+ return 158;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_6(100) != 100)
+ {
+ Console.WriteLine("test_4_6() failed.");
+ return 159;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_7(100) != 100)
+ {
+ Console.WriteLine("test_4_7() failed.");
+ return 160;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_8(100) != 100)
+ {
+ Console.WriteLine("test_4_8() failed.");
+ return 161;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_9(100) != 100)
+ {
+ Console.WriteLine("test_4_9() failed.");
+ return 162;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_10(100) != 100)
+ {
+ Console.WriteLine("test_4_10() failed.");
+ return 163;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_11(100) != 100)
+ {
+ Console.WriteLine("test_4_11() failed.");
+ return 164;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_12(100) != 100)
+ {
+ Console.WriteLine("test_4_12() failed.");
+ return 165;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_5_0(100) != 100)
+ {
+ Console.WriteLine("test_5_0() failed.");
+ return 166;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_6_0(100, __makeref(AA._init)) != 100)
+ {
+ Console.WriteLine("test_6_0() failed.");
+ return 167;
+ }
+ AA.verify_all(); Console.WriteLine("All tests passed.");
+ return 100;
+ }
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/body_safe_float.cs b/tests/src/JIT/Methodical/explicit/coverage/body_safe_float.cs
new file mode 100644
index 0000000000..426fe0b58d
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/body_safe_float.cs
@@ -0,0 +1,714 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+
+internal class TestApp
+{
+ private static float test_0_0(float num, AA init, AA zero)
+ {
+ return init.q;
+ }
+ private static float test_0_1(float num, AA init, AA zero)
+ {
+ zero.q = num;
+ return zero.q;
+ }
+ private static float test_0_2(float num, AA init, AA zero)
+ {
+ return init.q + zero.q;
+ }
+ private static float test_0_3(float num, AA init, AA zero)
+ {
+ return checked(init.q - zero.q);
+ }
+ private static float test_0_4(float num, AA init, AA zero)
+ {
+ zero.q += num; return zero.q;
+ }
+ private static float test_0_5(float num, AA init, AA zero)
+ {
+ zero.q += init.q; return zero.q;
+ }
+ private static float test_0_6(float num, AA init, AA zero)
+ {
+ if (init.q == num)
+ return 100;
+ else
+ return zero.q;
+ }
+ private static float test_0_7(float num, AA init, AA zero)
+ {
+ return init.q < num + 1 ? 100 : -1;
+ }
+ private static float test_0_8(float num, AA init, AA zero)
+ {
+ return (init.q > zero.q ? 1 : 0) + 99;
+ }
+ private static float test_0_9(float num, AA init, AA zero)
+ {
+ object bb = init.q;
+ return (float)bb;
+ }
+ private static float test_0_10(float num, AA init, AA zero)
+ {
+ double dbl = init.q;
+ return (float)dbl;
+ }
+ private static float test_0_11(float num, AA init, AA zero)
+ {
+ return AA.call_target(init.q);
+ }
+ private static float test_0_12(float num, AA init, AA zero)
+ {
+ return AA.call_target_ref(ref init.q);
+ }
+ private static float test_1_0(float num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q;
+ }
+ private static float test_1_1(float num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q = num;
+ return r_zero.q;
+ }
+ private static float test_1_2(float num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q + r_zero.q;
+ }
+ private static float test_1_3(float num, ref AA r_init, ref AA r_zero)
+ {
+ return checked(r_init.q - r_zero.q);
+ }
+ private static float test_1_4(float num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q += num; return r_zero.q;
+ }
+ private static float test_1_5(float num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q += r_init.q; return r_zero.q;
+ }
+ private static float test_1_6(float num, ref AA r_init, ref AA r_zero)
+ {
+ if (r_init.q == num)
+ return 100;
+ else
+ return r_zero.q;
+ }
+ private static float test_1_7(float num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q < num + 1 ? 100 : -1;
+ }
+ private static float test_1_8(float num, ref AA r_init, ref AA r_zero)
+ {
+ return (r_init.q > r_zero.q ? 1 : 0) + 99;
+ }
+ private static float test_1_9(float num, ref AA r_init, ref AA r_zero)
+ {
+ object bb = r_init.q;
+ return (float)bb;
+ }
+ private static float test_1_10(float num, ref AA r_init, ref AA r_zero)
+ {
+ double dbl = r_init.q;
+ return (float)dbl;
+ }
+ private static float test_1_11(float num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.call_target(r_init.q);
+ }
+ private static float test_1_12(float num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.call_target_ref(ref r_init.q);
+ }
+ private static float test_2_0(float num)
+ {
+ return AA.a_init[(int)num].q;
+ }
+ private static float test_2_1(float num)
+ {
+ AA.a_zero[(int)num].q = num;
+ return AA.a_zero[(int)num].q;
+ }
+ private static float test_2_2(float num)
+ {
+ return AA.a_init[(int)num].q + AA.a_zero[(int)num].q;
+ }
+ private static float test_2_3(float num)
+ {
+ return checked(AA.a_init[(int)num].q - AA.a_zero[(int)num].q);
+ }
+ private static float test_2_4(float num)
+ {
+ AA.a_zero[(int)num].q += num; return AA.a_zero[(int)num].q;
+ }
+ private static float test_2_5(float num)
+ {
+ AA.a_zero[(int)num].q += AA.a_init[(int)num].q; return AA.a_zero[(int)num].q;
+ }
+ private static float test_2_6(float num)
+ {
+ if (AA.a_init[(int)num].q == num)
+ return 100;
+ else
+ return AA.a_zero[(int)num].q;
+ }
+ private static float test_2_7(float num)
+ {
+ return AA.a_init[(int)num].q < num + 1 ? 100 : -1;
+ }
+ private static float test_2_8(float num)
+ {
+ return (AA.a_init[(int)num].q > AA.a_zero[(int)num].q ? 1 : 0) + 99;
+ }
+ private static float test_2_9(float num)
+ {
+ object bb = AA.a_init[(int)num].q;
+ return (float)bb;
+ }
+ private static float test_2_10(float num)
+ {
+ double dbl = AA.a_init[(int)num].q;
+ return (float)dbl;
+ }
+ private static float test_2_11(float num)
+ {
+ return AA.call_target(AA.a_init[(int)num].q);
+ }
+ private static float test_2_12(float num)
+ {
+ return AA.call_target_ref(ref AA.a_init[(int)num].q);
+ }
+ private static float test_3_0(float num)
+ {
+ return AA.aa_init[0, (int)num - 1, (int)num / 100].q;
+ }
+ private static float test_3_1(float num)
+ {
+ AA.aa_zero[0, (int)num - 1, (int)num / 100].q = num;
+ return AA.aa_zero[0, (int)num - 1, (int)num / 100].q;
+ }
+ private static float test_3_2(float num)
+ {
+ return AA.aa_init[0, (int)num - 1, (int)num / 100].q + AA.aa_zero[0, (int)num - 1, (int)num / 100].q;
+ }
+ private static float test_3_3(float num)
+ {
+ return checked(AA.aa_init[0, (int)num - 1, (int)num / 100].q - AA.aa_zero[0, (int)num - 1, (int)num / 100].q);
+ }
+ private static float test_3_4(float num)
+ {
+ AA.aa_zero[0, (int)num - 1, (int)num / 100].q += num; return AA.aa_zero[0, (int)num - 1, (int)num / 100].q;
+ }
+ private static float test_3_5(float num)
+ {
+ AA.aa_zero[0, (int)num - 1, (int)num / 100].q += AA.aa_init[0, (int)num - 1, (int)num / 100].q; return AA.aa_zero[0, (int)num - 1, (int)num / 100].q;
+ }
+ private static float test_3_6(float num)
+ {
+ if (AA.aa_init[0, (int)num - 1, (int)num / 100].q == num)
+ return 100;
+ else
+ return AA.aa_zero[0, (int)num - 1, (int)num / 100].q;
+ }
+ private static float test_3_7(float num)
+ {
+ return AA.aa_init[0, (int)num - 1, (int)num / 100].q < num + 1 ? 100 : -1;
+ }
+ private static float test_3_8(float num)
+ {
+ return (AA.aa_init[0, (int)num - 1, (int)num / 100].q > AA.aa_zero[0, (int)num - 1, (int)num / 100].q ? 1 : 0) + 99;
+ }
+ private static float test_3_9(float num)
+ {
+ object bb = AA.aa_init[0, (int)num - 1, (int)num / 100].q;
+ return (float)bb;
+ }
+ private static float test_3_10(float num)
+ {
+ double dbl = AA.aa_init[0, (int)num - 1, (int)num / 100].q;
+ return (float)dbl;
+ }
+ private static float test_3_11(float num)
+ {
+ return AA.call_target(AA.aa_init[0, (int)num - 1, (int)num / 100].q);
+ }
+ private static float test_3_12(float num)
+ {
+ return AA.call_target_ref(ref AA.aa_init[0, (int)num - 1, (int)num / 100].q);
+ }
+ private static float test_4_0(float num)
+ {
+ return BB.f_init.q;
+ }
+ private static float test_4_1(float num)
+ {
+ BB.f_zero.q = num;
+ return BB.f_zero.q;
+ }
+ private static float test_4_2(float num)
+ {
+ return BB.f_init.q + BB.f_zero.q;
+ }
+ private static float test_4_3(float num)
+ {
+ return checked(BB.f_init.q - BB.f_zero.q);
+ }
+ private static float test_4_4(float num)
+ {
+ BB.f_zero.q += num; return BB.f_zero.q;
+ }
+ private static float test_4_5(float num)
+ {
+ BB.f_zero.q += BB.f_init.q; return BB.f_zero.q;
+ }
+ private static float test_4_6(float num)
+ {
+ if (BB.f_init.q == num)
+ return 100;
+ else
+ return BB.f_zero.q;
+ }
+ private static float test_4_7(float num)
+ {
+ return BB.f_init.q < num + 1 ? 100 : -1;
+ }
+ private static float test_4_8(float num)
+ {
+ return (BB.f_init.q > BB.f_zero.q ? 1 : 0) + 99;
+ }
+ private static float test_4_9(float num)
+ {
+ object bb = BB.f_init.q;
+ return (float)bb;
+ }
+ private static float test_4_10(float num)
+ {
+ double dbl = BB.f_init.q;
+ return (float)dbl;
+ }
+ private static float test_4_11(float num)
+ {
+ return AA.call_target(BB.f_init.q);
+ }
+ private static float test_4_12(float num)
+ {
+ return AA.call_target_ref(ref BB.f_init.q);
+ }
+ private static float test_5_0(float num)
+ {
+ return ((AA)AA.b_init).q;
+ }
+ private static float test_6_0(float num, TypedReference tr_init)
+ {
+ return __refvalue(tr_init, AA).q;
+ }
+
+ private static unsafe int Main()
+ {
+ AA.reset();
+ if (test_0_0(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_0() failed.");
+ return 101;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_1(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_1() failed.");
+ return 102;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_2(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_2() failed.");
+ return 103;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_3(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_3() failed.");
+ return 104;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_4(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_4() failed.");
+ return 105;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_5(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_5() failed.");
+ return 106;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_6(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_6() failed.");
+ return 107;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_7(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_7() failed.");
+ return 108;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_8(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_8() failed.");
+ return 109;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_9(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_9() failed.");
+ return 110;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_10(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_10() failed.");
+ return 111;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_11(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_11() failed.");
+ return 112;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_12(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_12() failed.");
+ return 113;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_0(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_0() failed.");
+ return 114;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_1(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_1() failed.");
+ return 115;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_2(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_2() failed.");
+ return 116;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_3(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_3() failed.");
+ return 117;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_4(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_4() failed.");
+ return 118;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_5(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_5() failed.");
+ return 119;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_6(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_6() failed.");
+ return 120;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_7(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_7() failed.");
+ return 121;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_8(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_8() failed.");
+ return 122;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_9(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_9() failed.");
+ return 123;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_10(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_10() failed.");
+ return 124;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_11(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_11() failed.");
+ return 125;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_12(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_12() failed.");
+ return 126;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_0(100) != 100)
+ {
+ Console.WriteLine("test_2_0() failed.");
+ return 127;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_1(100) != 100)
+ {
+ Console.WriteLine("test_2_1() failed.");
+ return 128;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_2(100) != 100)
+ {
+ Console.WriteLine("test_2_2() failed.");
+ return 129;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_3(100) != 100)
+ {
+ Console.WriteLine("test_2_3() failed.");
+ return 130;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_4(100) != 100)
+ {
+ Console.WriteLine("test_2_4() failed.");
+ return 131;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_5(100) != 100)
+ {
+ Console.WriteLine("test_2_5() failed.");
+ return 132;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_6(100) != 100)
+ {
+ Console.WriteLine("test_2_6() failed.");
+ return 133;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_7(100) != 100)
+ {
+ Console.WriteLine("test_2_7() failed.");
+ return 134;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_8(100) != 100)
+ {
+ Console.WriteLine("test_2_8() failed.");
+ return 135;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_9(100) != 100)
+ {
+ Console.WriteLine("test_2_9() failed.");
+ return 136;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_10(100) != 100)
+ {
+ Console.WriteLine("test_2_10() failed.");
+ return 137;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_11(100) != 100)
+ {
+ Console.WriteLine("test_2_11() failed.");
+ return 138;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_12(100) != 100)
+ {
+ Console.WriteLine("test_2_12() failed.");
+ return 139;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_0(100) != 100)
+ {
+ Console.WriteLine("test_3_0() failed.");
+ return 140;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_1(100) != 100)
+ {
+ Console.WriteLine("test_3_1() failed.");
+ return 141;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_2(100) != 100)
+ {
+ Console.WriteLine("test_3_2() failed.");
+ return 142;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_3(100) != 100)
+ {
+ Console.WriteLine("test_3_3() failed.");
+ return 143;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_4(100) != 100)
+ {
+ Console.WriteLine("test_3_4() failed.");
+ return 144;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_5(100) != 100)
+ {
+ Console.WriteLine("test_3_5() failed.");
+ return 145;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_6(100) != 100)
+ {
+ Console.WriteLine("test_3_6() failed.");
+ return 146;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_7(100) != 100)
+ {
+ Console.WriteLine("test_3_7() failed.");
+ return 147;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_8(100) != 100)
+ {
+ Console.WriteLine("test_3_8() failed.");
+ return 148;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_9(100) != 100)
+ {
+ Console.WriteLine("test_3_9() failed.");
+ return 149;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_10(100) != 100)
+ {
+ Console.WriteLine("test_3_10() failed.");
+ return 150;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_11(100) != 100)
+ {
+ Console.WriteLine("test_3_11() failed.");
+ return 151;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_12(100) != 100)
+ {
+ Console.WriteLine("test_3_12() failed.");
+ return 152;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_0(100) != 100)
+ {
+ Console.WriteLine("test_4_0() failed.");
+ return 153;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_1(100) != 100)
+ {
+ Console.WriteLine("test_4_1() failed.");
+ return 154;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_2(100) != 100)
+ {
+ Console.WriteLine("test_4_2() failed.");
+ return 155;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_3(100) != 100)
+ {
+ Console.WriteLine("test_4_3() failed.");
+ return 156;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_4(100) != 100)
+ {
+ Console.WriteLine("test_4_4() failed.");
+ return 157;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_5(100) != 100)
+ {
+ Console.WriteLine("test_4_5() failed.");
+ return 158;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_6(100) != 100)
+ {
+ Console.WriteLine("test_4_6() failed.");
+ return 159;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_7(100) != 100)
+ {
+ Console.WriteLine("test_4_7() failed.");
+ return 160;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_8(100) != 100)
+ {
+ Console.WriteLine("test_4_8() failed.");
+ return 161;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_9(100) != 100)
+ {
+ Console.WriteLine("test_4_9() failed.");
+ return 162;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_10(100) != 100)
+ {
+ Console.WriteLine("test_4_10() failed.");
+ return 163;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_11(100) != 100)
+ {
+ Console.WriteLine("test_4_11() failed.");
+ return 164;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_12(100) != 100)
+ {
+ Console.WriteLine("test_4_12() failed.");
+ return 165;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_5_0(100) != 100)
+ {
+ Console.WriteLine("test_5_0() failed.");
+ return 166;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_6_0(100, __makeref(AA._init)) != 100)
+ {
+ Console.WriteLine("test_6_0() failed.");
+ return 167;
+ }
+ AA.verify_all(); Console.WriteLine("All tests passed.");
+ return 100;
+ }
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/body_safe_int.cs b/tests/src/JIT/Methodical/explicit/coverage/body_safe_int.cs
new file mode 100644
index 0000000000..32c13a0f1d
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/body_safe_int.cs
@@ -0,0 +1,969 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+
+internal class TestApp
+{
+ private static int test_0_0(int num, AA init, AA zero)
+ {
+ return init.q;
+ }
+ private static int test_0_1(int num, AA init, AA zero)
+ {
+ zero.q = num;
+ return zero.q;
+ }
+ private static int test_0_2(int num, AA init, AA zero)
+ {
+ return init.q + zero.q;
+ }
+ private static int test_0_3(int num, AA init, AA zero)
+ {
+ return checked(init.q - zero.q);
+ }
+ private static int test_0_4(int num, AA init, AA zero)
+ {
+ zero.q += num; return zero.q;
+ }
+ private static int test_0_5(int num, AA init, AA zero)
+ {
+ zero.q += init.q; return zero.q;
+ }
+ private static int test_0_6(int num, AA init, AA zero)
+ {
+ if (init.q == num)
+ return 100;
+ else
+ return zero.q;
+ }
+ private static int test_0_7(int num, AA init, AA zero)
+ {
+ return init.q < num + 1 ? 100 : -1;
+ }
+ private static int test_0_8(int num, AA init, AA zero)
+ {
+ return (init.q > zero.q ? 1 : 0) + 99;
+ }
+ private static int test_0_9(int num, AA init, AA zero)
+ {
+ return (init.q ^ zero.q) | num;
+ }
+ private static int test_0_10(int num, AA init, AA zero)
+ {
+ zero.q |= init.q;
+ return zero.q & num;
+ }
+ private static int test_0_11(int num, AA init, AA zero)
+ {
+ return init.q >> zero.q;
+ }
+ private static int test_0_12(int num, AA init, AA zero)
+ {
+ return AA.a_init[init.q].q;
+ }
+ private static int test_0_13(int num, AA init, AA zero)
+ {
+ return AA.aa_init[num - 100, (init.q | 1) - 2, 1 + zero.q].q;
+ }
+ private static int test_0_14(int num, AA init, AA zero)
+ {
+ object bb = init.q;
+ return (int)bb;
+ }
+ private static int test_0_15(int num, AA init, AA zero)
+ {
+ double dbl = init.q;
+ return (int)dbl;
+ }
+ private static int test_0_16(int num, AA init, AA zero)
+ {
+ return AA.call_target(init.q);
+ }
+ private static int test_0_17(int num, AA init, AA zero)
+ {
+ return AA.call_target_ref(ref init.q);
+ }
+ private static int test_1_0(int num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q;
+ }
+ private static int test_1_1(int num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q = num;
+ return r_zero.q;
+ }
+ private static int test_1_2(int num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q + r_zero.q;
+ }
+ private static int test_1_3(int num, ref AA r_init, ref AA r_zero)
+ {
+ return checked(r_init.q - r_zero.q);
+ }
+ private static int test_1_4(int num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q += num; return r_zero.q;
+ }
+ private static int test_1_5(int num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q += r_init.q; return r_zero.q;
+ }
+ private static int test_1_6(int num, ref AA r_init, ref AA r_zero)
+ {
+ if (r_init.q == num)
+ return 100;
+ else
+ return r_zero.q;
+ }
+ private static int test_1_7(int num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q < num + 1 ? 100 : -1;
+ }
+ private static int test_1_8(int num, ref AA r_init, ref AA r_zero)
+ {
+ return (r_init.q > r_zero.q ? 1 : 0) + 99;
+ }
+ private static int test_1_9(int num, ref AA r_init, ref AA r_zero)
+ {
+ return (r_init.q ^ r_zero.q) | num;
+ }
+ private static int test_1_10(int num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q |= r_init.q;
+ return r_zero.q & num;
+ }
+ private static int test_1_11(int num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q >> r_zero.q;
+ }
+ private static int test_1_12(int num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.a_init[r_init.q].q;
+ }
+ private static int test_1_13(int num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.aa_init[num - 100, (r_init.q | 1) - 2, 1 + r_zero.q].q;
+ }
+ private static int test_1_14(int num, ref AA r_init, ref AA r_zero)
+ {
+ object bb = r_init.q;
+ return (int)bb;
+ }
+ private static int test_1_15(int num, ref AA r_init, ref AA r_zero)
+ {
+ double dbl = r_init.q;
+ return (int)dbl;
+ }
+ private static int test_1_16(int num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.call_target(r_init.q);
+ }
+ private static int test_1_17(int num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.call_target_ref(ref r_init.q);
+ }
+ private static int test_2_0(int num)
+ {
+ return AA.a_init[num].q;
+ }
+ private static int test_2_1(int num)
+ {
+ AA.a_zero[num].q = num;
+ return AA.a_zero[num].q;
+ }
+ private static int test_2_2(int num)
+ {
+ return AA.a_init[num].q + AA.a_zero[num].q;
+ }
+ private static int test_2_3(int num)
+ {
+ return checked(AA.a_init[num].q - AA.a_zero[num].q);
+ }
+ private static int test_2_4(int num)
+ {
+ AA.a_zero[num].q += num; return AA.a_zero[num].q;
+ }
+ private static int test_2_5(int num)
+ {
+ AA.a_zero[num].q += AA.a_init[num].q; return AA.a_zero[num].q;
+ }
+ private static int test_2_6(int num)
+ {
+ if (AA.a_init[num].q == num)
+ return 100;
+ else
+ return AA.a_zero[num].q;
+ }
+ private static int test_2_7(int num)
+ {
+ return AA.a_init[num].q < num + 1 ? 100 : -1;
+ }
+ private static int test_2_8(int num)
+ {
+ return (AA.a_init[num].q > AA.a_zero[num].q ? 1 : 0) + 99;
+ }
+ private static int test_2_9(int num)
+ {
+ return (AA.a_init[num].q ^ AA.a_zero[num].q) | num;
+ }
+ private static int test_2_10(int num)
+ {
+ AA.a_zero[num].q |= AA.a_init[num].q;
+ return AA.a_zero[num].q & num;
+ }
+ private static int test_2_11(int num)
+ {
+ return AA.a_init[num].q >> AA.a_zero[num].q;
+ }
+ private static int test_2_12(int num)
+ {
+ return AA.a_init[AA.a_init[num].q].q;
+ }
+ private static int test_2_13(int num)
+ {
+ return AA.aa_init[num - 100, (AA.a_init[num].q | 1) - 2, 1 + AA.a_zero[num].q].q;
+ }
+ private static int test_2_14(int num)
+ {
+ object bb = AA.a_init[num].q;
+ return (int)bb;
+ }
+ private static int test_2_15(int num)
+ {
+ double dbl = AA.a_init[num].q;
+ return (int)dbl;
+ }
+ private static int test_2_16(int num)
+ {
+ return AA.call_target(AA.a_init[num].q);
+ }
+ private static int test_2_17(int num)
+ {
+ return AA.call_target_ref(ref AA.a_init[num].q);
+ }
+ private static int test_3_0(int num)
+ {
+ return AA.aa_init[0, num - 1, num / 100].q;
+ }
+ private static int test_3_1(int num)
+ {
+ AA.aa_zero[0, num - 1, num / 100].q = num;
+ return AA.aa_zero[0, num - 1, num / 100].q;
+ }
+ private static int test_3_2(int num)
+ {
+ return AA.aa_init[0, num - 1, num / 100].q + AA.aa_zero[0, num - 1, num / 100].q;
+ }
+ private static int test_3_3(int num)
+ {
+ return checked(AA.aa_init[0, num - 1, num / 100].q - AA.aa_zero[0, num - 1, num / 100].q);
+ }
+ private static int test_3_4(int num)
+ {
+ AA.aa_zero[0, num - 1, num / 100].q += num; return AA.aa_zero[0, num - 1, num / 100].q;
+ }
+ private static int test_3_5(int num)
+ {
+ AA.aa_zero[0, num - 1, num / 100].q += AA.aa_init[0, num - 1, num / 100].q; return AA.aa_zero[0, num - 1, num / 100].q;
+ }
+ private static int test_3_6(int num)
+ {
+ if (AA.aa_init[0, num - 1, num / 100].q == num)
+ return 100;
+ else
+ return AA.aa_zero[0, num - 1, num / 100].q;
+ }
+ private static int test_3_7(int num)
+ {
+ return AA.aa_init[0, num - 1, num / 100].q < num + 1 ? 100 : -1;
+ }
+ private static int test_3_8(int num)
+ {
+ return (AA.aa_init[0, num - 1, num / 100].q > AA.aa_zero[0, num - 1, num / 100].q ? 1 : 0) + 99;
+ }
+ private static int test_3_9(int num)
+ {
+ return (AA.aa_init[0, num - 1, num / 100].q ^ AA.aa_zero[0, num - 1, num / 100].q) | num;
+ }
+ private static int test_3_10(int num)
+ {
+ AA.aa_zero[0, num - 1, num / 100].q |= AA.aa_init[0, num - 1, num / 100].q;
+ return AA.aa_zero[0, num - 1, num / 100].q & num;
+ }
+ private static int test_3_11(int num)
+ {
+ return AA.aa_init[0, num - 1, num / 100].q >> AA.aa_zero[0, num - 1, num / 100].q;
+ }
+ private static int test_3_12(int num)
+ {
+ return AA.a_init[AA.aa_init[0, num - 1, num / 100].q].q;
+ }
+ private static int test_3_13(int num)
+ {
+ return AA.aa_init[num - 100, (AA.aa_init[0, num - 1, num / 100].q | 1) - 2, 1 + AA.aa_zero[0, num - 1, num / 100].q].q;
+ }
+ private static int test_3_14(int num)
+ {
+ object bb = AA.aa_init[0, num - 1, num / 100].q;
+ return (int)bb;
+ }
+ private static int test_3_15(int num)
+ {
+ double dbl = AA.aa_init[0, num - 1, num / 100].q;
+ return (int)dbl;
+ }
+ private static int test_3_16(int num)
+ {
+ return AA.call_target(AA.aa_init[0, num - 1, num / 100].q);
+ }
+ private static int test_3_17(int num)
+ {
+ return AA.call_target_ref(ref AA.aa_init[0, num - 1, num / 100].q);
+ }
+ private static int test_4_0(int num)
+ {
+ return BB.f_init.q;
+ }
+ private static int test_4_1(int num)
+ {
+ BB.f_zero.q = num;
+ return BB.f_zero.q;
+ }
+ private static int test_4_2(int num)
+ {
+ return BB.f_init.q + BB.f_zero.q;
+ }
+ private static int test_4_3(int num)
+ {
+ return checked(BB.f_init.q - BB.f_zero.q);
+ }
+ private static int test_4_4(int num)
+ {
+ BB.f_zero.q += num; return BB.f_zero.q;
+ }
+ private static int test_4_5(int num)
+ {
+ BB.f_zero.q += BB.f_init.q; return BB.f_zero.q;
+ }
+ private static int test_4_6(int num)
+ {
+ if (BB.f_init.q == num)
+ return 100;
+ else
+ return BB.f_zero.q;
+ }
+ private static int test_4_7(int num)
+ {
+ return BB.f_init.q < num + 1 ? 100 : -1;
+ }
+ private static int test_4_8(int num)
+ {
+ return (BB.f_init.q > BB.f_zero.q ? 1 : 0) + 99;
+ }
+ private static int test_4_9(int num)
+ {
+ return (BB.f_init.q ^ BB.f_zero.q) | num;
+ }
+ private static int test_4_10(int num)
+ {
+ BB.f_zero.q |= BB.f_init.q;
+ return BB.f_zero.q & num;
+ }
+ private static int test_4_11(int num)
+ {
+ return BB.f_init.q >> BB.f_zero.q;
+ }
+ private static int test_4_12(int num)
+ {
+ return AA.a_init[BB.f_init.q].q;
+ }
+ private static int test_4_13(int num)
+ {
+ return AA.aa_init[num - 100, (BB.f_init.q | 1) - 2, 1 + BB.f_zero.q].q;
+ }
+ private static int test_4_14(int num)
+ {
+ object bb = BB.f_init.q;
+ return (int)bb;
+ }
+ private static int test_4_15(int num)
+ {
+ double dbl = BB.f_init.q;
+ return (int)dbl;
+ }
+ private static int test_4_16(int num)
+ {
+ return AA.call_target(BB.f_init.q);
+ }
+ private static int test_4_17(int num)
+ {
+ return AA.call_target_ref(ref BB.f_init.q);
+ }
+ private static int test_5_0(int num)
+ {
+ return ((AA)AA.b_init).q;
+ }
+ private static int test_6_0(int num, TypedReference tr_init)
+ {
+ return __refvalue(tr_init, AA).q;
+ }
+
+ private static unsafe int Main()
+ {
+ AA.reset();
+ if (test_0_0(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_0() failed.");
+ return 101;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_1(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_1() failed.");
+ return 102;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_2(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_2() failed.");
+ return 103;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_3(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_3() failed.");
+ return 104;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_4(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_4() failed.");
+ return 105;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_5(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_5() failed.");
+ return 106;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_6(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_6() failed.");
+ return 107;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_7(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_7() failed.");
+ return 108;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_8(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_8() failed.");
+ return 109;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_9(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_9() failed.");
+ return 110;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_10(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_10() failed.");
+ return 111;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_11(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_11() failed.");
+ return 112;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_12(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_12() failed.");
+ return 113;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_13(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_13() failed.");
+ return 114;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_14(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_14() failed.");
+ return 115;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_15(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_15() failed.");
+ return 116;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_16(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_16() failed.");
+ return 117;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_17(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_17() failed.");
+ return 118;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_0(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_0() failed.");
+ return 119;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_1(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_1() failed.");
+ return 120;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_2(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_2() failed.");
+ return 121;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_3(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_3() failed.");
+ return 122;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_4(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_4() failed.");
+ return 123;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_5(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_5() failed.");
+ return 124;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_6(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_6() failed.");
+ return 125;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_7(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_7() failed.");
+ return 126;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_8(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_8() failed.");
+ return 127;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_9(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_9() failed.");
+ return 128;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_10(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_10() failed.");
+ return 129;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_11(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_11() failed.");
+ return 130;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_12(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_12() failed.");
+ return 131;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_13(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_13() failed.");
+ return 132;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_14(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_14() failed.");
+ return 133;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_15(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_15() failed.");
+ return 134;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_16(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_16() failed.");
+ return 135;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_17(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_17() failed.");
+ return 136;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_0(100) != 100)
+ {
+ Console.WriteLine("test_2_0() failed.");
+ return 137;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_1(100) != 100)
+ {
+ Console.WriteLine("test_2_1() failed.");
+ return 138;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_2(100) != 100)
+ {
+ Console.WriteLine("test_2_2() failed.");
+ return 139;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_3(100) != 100)
+ {
+ Console.WriteLine("test_2_3() failed.");
+ return 140;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_4(100) != 100)
+ {
+ Console.WriteLine("test_2_4() failed.");
+ return 141;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_5(100) != 100)
+ {
+ Console.WriteLine("test_2_5() failed.");
+ return 142;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_6(100) != 100)
+ {
+ Console.WriteLine("test_2_6() failed.");
+ return 143;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_7(100) != 100)
+ {
+ Console.WriteLine("test_2_7() failed.");
+ return 144;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_8(100) != 100)
+ {
+ Console.WriteLine("test_2_8() failed.");
+ return 145;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_9(100) != 100)
+ {
+ Console.WriteLine("test_2_9() failed.");
+ return 146;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_10(100) != 100)
+ {
+ Console.WriteLine("test_2_10() failed.");
+ return 147;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_11(100) != 100)
+ {
+ Console.WriteLine("test_2_11() failed.");
+ return 148;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_12(100) != 100)
+ {
+ Console.WriteLine("test_2_12() failed.");
+ return 149;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_13(100) != 100)
+ {
+ Console.WriteLine("test_2_13() failed.");
+ return 150;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_14(100) != 100)
+ {
+ Console.WriteLine("test_2_14() failed.");
+ return 151;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_15(100) != 100)
+ {
+ Console.WriteLine("test_2_15() failed.");
+ return 152;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_16(100) != 100)
+ {
+ Console.WriteLine("test_2_16() failed.");
+ return 153;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_17(100) != 100)
+ {
+ Console.WriteLine("test_2_17() failed.");
+ return 154;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_0(100) != 100)
+ {
+ Console.WriteLine("test_3_0() failed.");
+ return 155;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_1(100) != 100)
+ {
+ Console.WriteLine("test_3_1() failed.");
+ return 156;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_2(100) != 100)
+ {
+ Console.WriteLine("test_3_2() failed.");
+ return 157;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_3(100) != 100)
+ {
+ Console.WriteLine("test_3_3() failed.");
+ return 158;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_4(100) != 100)
+ {
+ Console.WriteLine("test_3_4() failed.");
+ return 159;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_5(100) != 100)
+ {
+ Console.WriteLine("test_3_5() failed.");
+ return 160;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_6(100) != 100)
+ {
+ Console.WriteLine("test_3_6() failed.");
+ return 161;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_7(100) != 100)
+ {
+ Console.WriteLine("test_3_7() failed.");
+ return 162;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_8(100) != 100)
+ {
+ Console.WriteLine("test_3_8() failed.");
+ return 163;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_9(100) != 100)
+ {
+ Console.WriteLine("test_3_9() failed.");
+ return 164;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_10(100) != 100)
+ {
+ Console.WriteLine("test_3_10() failed.");
+ return 165;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_11(100) != 100)
+ {
+ Console.WriteLine("test_3_11() failed.");
+ return 166;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_12(100) != 100)
+ {
+ Console.WriteLine("test_3_12() failed.");
+ return 167;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_13(100) != 100)
+ {
+ Console.WriteLine("test_3_13() failed.");
+ return 168;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_14(100) != 100)
+ {
+ Console.WriteLine("test_3_14() failed.");
+ return 169;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_15(100) != 100)
+ {
+ Console.WriteLine("test_3_15() failed.");
+ return 170;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_16(100) != 100)
+ {
+ Console.WriteLine("test_3_16() failed.");
+ return 171;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_17(100) != 100)
+ {
+ Console.WriteLine("test_3_17() failed.");
+ return 172;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_0(100) != 100)
+ {
+ Console.WriteLine("test_4_0() failed.");
+ return 173;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_1(100) != 100)
+ {
+ Console.WriteLine("test_4_1() failed.");
+ return 174;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_2(100) != 100)
+ {
+ Console.WriteLine("test_4_2() failed.");
+ return 175;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_3(100) != 100)
+ {
+ Console.WriteLine("test_4_3() failed.");
+ return 176;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_4(100) != 100)
+ {
+ Console.WriteLine("test_4_4() failed.");
+ return 177;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_5(100) != 100)
+ {
+ Console.WriteLine("test_4_5() failed.");
+ return 178;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_6(100) != 100)
+ {
+ Console.WriteLine("test_4_6() failed.");
+ return 179;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_7(100) != 100)
+ {
+ Console.WriteLine("test_4_7() failed.");
+ return 180;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_8(100) != 100)
+ {
+ Console.WriteLine("test_4_8() failed.");
+ return 181;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_9(100) != 100)
+ {
+ Console.WriteLine("test_4_9() failed.");
+ return 182;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_10(100) != 100)
+ {
+ Console.WriteLine("test_4_10() failed.");
+ return 183;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_11(100) != 100)
+ {
+ Console.WriteLine("test_4_11() failed.");
+ return 184;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_12(100) != 100)
+ {
+ Console.WriteLine("test_4_12() failed.");
+ return 185;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_13(100) != 100)
+ {
+ Console.WriteLine("test_4_13() failed.");
+ return 186;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_14(100) != 100)
+ {
+ Console.WriteLine("test_4_14() failed.");
+ return 187;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_15(100) != 100)
+ {
+ Console.WriteLine("test_4_15() failed.");
+ return 188;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_16(100) != 100)
+ {
+ Console.WriteLine("test_4_16() failed.");
+ return 189;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_17(100) != 100)
+ {
+ Console.WriteLine("test_4_17() failed.");
+ return 190;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_5_0(100) != 100)
+ {
+ Console.WriteLine("test_5_0() failed.");
+ return 191;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_6_0(100, __makeref(AA._init)) != 100)
+ {
+ Console.WriteLine("test_6_0() failed.");
+ return 192;
+ }
+ AA.verify_all(); Console.WriteLine("All tests passed.");
+ return 100;
+ }
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/body_safe_long.cs b/tests/src/JIT/Methodical/explicit/coverage/body_safe_long.cs
new file mode 100644
index 0000000000..5f3d5b7024
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/body_safe_long.cs
@@ -0,0 +1,969 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+
+internal class TestApp
+{
+ private static long test_0_0(long num, AA init, AA zero)
+ {
+ return init.q;
+ }
+ private static long test_0_1(long num, AA init, AA zero)
+ {
+ zero.q = num;
+ return zero.q;
+ }
+ private static long test_0_2(long num, AA init, AA zero)
+ {
+ return init.q + zero.q;
+ }
+ private static long test_0_3(long num, AA init, AA zero)
+ {
+ return checked(init.q - zero.q);
+ }
+ private static long test_0_4(long num, AA init, AA zero)
+ {
+ zero.q += num; return zero.q;
+ }
+ private static long test_0_5(long num, AA init, AA zero)
+ {
+ zero.q += init.q; return zero.q;
+ }
+ private static long test_0_6(long num, AA init, AA zero)
+ {
+ if (init.q == num)
+ return 100;
+ else
+ return zero.q;
+ }
+ private static long test_0_7(long num, AA init, AA zero)
+ {
+ return init.q < num + 1 ? 100 : -1;
+ }
+ private static long test_0_8(long num, AA init, AA zero)
+ {
+ return (init.q > zero.q ? 1 : 0) + 99;
+ }
+ private static long test_0_9(long num, AA init, AA zero)
+ {
+ return (init.q ^ zero.q) | num;
+ }
+ private static long test_0_10(long num, AA init, AA zero)
+ {
+ zero.q |= init.q;
+ return zero.q & num;
+ }
+ private static long test_0_11(long num, AA init, AA zero)
+ {
+ return init.q >> (int)zero.q;
+ }
+ private static long test_0_12(long num, AA init, AA zero)
+ {
+ return AA.a_init[init.q].q;
+ }
+ private static long test_0_13(long num, AA init, AA zero)
+ {
+ return AA.aa_init[num - 100, (init.q | 1) - 2, 1 + zero.q].q;
+ }
+ private static long test_0_14(long num, AA init, AA zero)
+ {
+ object bb = init.q;
+ return (long)bb;
+ }
+ private static long test_0_15(long num, AA init, AA zero)
+ {
+ double dbl = init.q;
+ return (long)dbl;
+ }
+ private static long test_0_16(long num, AA init, AA zero)
+ {
+ return AA.call_target(init.q);
+ }
+ private static long test_0_17(long num, AA init, AA zero)
+ {
+ return AA.call_target_ref(ref init.q);
+ }
+ private static long test_1_0(long num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q;
+ }
+ private static long test_1_1(long num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q = num;
+ return r_zero.q;
+ }
+ private static long test_1_2(long num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q + r_zero.q;
+ }
+ private static long test_1_3(long num, ref AA r_init, ref AA r_zero)
+ {
+ return checked(r_init.q - r_zero.q);
+ }
+ private static long test_1_4(long num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q += num; return r_zero.q;
+ }
+ private static long test_1_5(long num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q += r_init.q; return r_zero.q;
+ }
+ private static long test_1_6(long num, ref AA r_init, ref AA r_zero)
+ {
+ if (r_init.q == num)
+ return 100;
+ else
+ return r_zero.q;
+ }
+ private static long test_1_7(long num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q < num + 1 ? 100 : -1;
+ }
+ private static long test_1_8(long num, ref AA r_init, ref AA r_zero)
+ {
+ return (r_init.q > r_zero.q ? 1 : 0) + 99;
+ }
+ private static long test_1_9(long num, ref AA r_init, ref AA r_zero)
+ {
+ return (r_init.q ^ r_zero.q) | num;
+ }
+ private static long test_1_10(long num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q |= r_init.q;
+ return r_zero.q & num;
+ }
+ private static long test_1_11(long num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q >> (int)r_zero.q;
+ }
+ private static long test_1_12(long num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.a_init[r_init.q].q;
+ }
+ private static long test_1_13(long num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.aa_init[num - 100, (r_init.q | 1) - 2, 1 + r_zero.q].q;
+ }
+ private static long test_1_14(long num, ref AA r_init, ref AA r_zero)
+ {
+ object bb = r_init.q;
+ return (long)bb;
+ }
+ private static long test_1_15(long num, ref AA r_init, ref AA r_zero)
+ {
+ double dbl = r_init.q;
+ return (long)dbl;
+ }
+ private static long test_1_16(long num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.call_target(r_init.q);
+ }
+ private static long test_1_17(long num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.call_target_ref(ref r_init.q);
+ }
+ private static long test_2_0(long num)
+ {
+ return AA.a_init[num].q;
+ }
+ private static long test_2_1(long num)
+ {
+ AA.a_zero[num].q = num;
+ return AA.a_zero[num].q;
+ }
+ private static long test_2_2(long num)
+ {
+ return AA.a_init[num].q + AA.a_zero[num].q;
+ }
+ private static long test_2_3(long num)
+ {
+ return checked(AA.a_init[num].q - AA.a_zero[num].q);
+ }
+ private static long test_2_4(long num)
+ {
+ AA.a_zero[num].q += num; return AA.a_zero[num].q;
+ }
+ private static long test_2_5(long num)
+ {
+ AA.a_zero[num].q += AA.a_init[num].q; return AA.a_zero[num].q;
+ }
+ private static long test_2_6(long num)
+ {
+ if (AA.a_init[num].q == num)
+ return 100;
+ else
+ return AA.a_zero[num].q;
+ }
+ private static long test_2_7(long num)
+ {
+ return AA.a_init[num].q < num + 1 ? 100 : -1;
+ }
+ private static long test_2_8(long num)
+ {
+ return (AA.a_init[num].q > AA.a_zero[num].q ? 1 : 0) + 99;
+ }
+ private static long test_2_9(long num)
+ {
+ return (AA.a_init[num].q ^ AA.a_zero[num].q) | num;
+ }
+ private static long test_2_10(long num)
+ {
+ AA.a_zero[num].q |= AA.a_init[num].q;
+ return AA.a_zero[num].q & num;
+ }
+ private static long test_2_11(long num)
+ {
+ return AA.a_init[num].q >> (int)AA.a_zero[num].q;
+ }
+ private static long test_2_12(long num)
+ {
+ return AA.a_init[AA.a_init[num].q].q;
+ }
+ private static long test_2_13(long num)
+ {
+ return AA.aa_init[num - 100, (AA.a_init[num].q | 1) - 2, 1 + AA.a_zero[num].q].q;
+ }
+ private static long test_2_14(long num)
+ {
+ object bb = AA.a_init[num].q;
+ return (long)bb;
+ }
+ private static long test_2_15(long num)
+ {
+ double dbl = AA.a_init[num].q;
+ return (long)dbl;
+ }
+ private static long test_2_16(long num)
+ {
+ return AA.call_target(AA.a_init[num].q);
+ }
+ private static long test_2_17(long num)
+ {
+ return AA.call_target_ref(ref AA.a_init[num].q);
+ }
+ private static long test_3_0(long num)
+ {
+ return AA.aa_init[0, num - 1, num / 100].q;
+ }
+ private static long test_3_1(long num)
+ {
+ AA.aa_zero[0, num - 1, num / 100].q = num;
+ return AA.aa_zero[0, num - 1, num / 100].q;
+ }
+ private static long test_3_2(long num)
+ {
+ return AA.aa_init[0, num - 1, num / 100].q + AA.aa_zero[0, num - 1, num / 100].q;
+ }
+ private static long test_3_3(long num)
+ {
+ return checked(AA.aa_init[0, num - 1, num / 100].q - AA.aa_zero[0, num - 1, num / 100].q);
+ }
+ private static long test_3_4(long num)
+ {
+ AA.aa_zero[0, num - 1, num / 100].q += num; return AA.aa_zero[0, num - 1, num / 100].q;
+ }
+ private static long test_3_5(long num)
+ {
+ AA.aa_zero[0, num - 1, num / 100].q += AA.aa_init[0, num - 1, num / 100].q; return AA.aa_zero[0, num - 1, num / 100].q;
+ }
+ private static long test_3_6(long num)
+ {
+ if (AA.aa_init[0, num - 1, num / 100].q == num)
+ return 100;
+ else
+ return AA.aa_zero[0, num - 1, num / 100].q;
+ }
+ private static long test_3_7(long num)
+ {
+ return AA.aa_init[0, num - 1, num / 100].q < num + 1 ? 100 : -1;
+ }
+ private static long test_3_8(long num)
+ {
+ return (AA.aa_init[0, num - 1, num / 100].q > AA.aa_zero[0, num - 1, num / 100].q ? 1 : 0) + 99;
+ }
+ private static long test_3_9(long num)
+ {
+ return (AA.aa_init[0, num - 1, num / 100].q ^ AA.aa_zero[0, num - 1, num / 100].q) | num;
+ }
+ private static long test_3_10(long num)
+ {
+ AA.aa_zero[0, num - 1, num / 100].q |= AA.aa_init[0, num - 1, num / 100].q;
+ return AA.aa_zero[0, num - 1, num / 100].q & num;
+ }
+ private static long test_3_11(long num)
+ {
+ return AA.aa_init[0, num - 1, num / 100].q >> (int)AA.aa_zero[0, num - 1, num / 100].q;
+ }
+ private static long test_3_12(long num)
+ {
+ return AA.a_init[AA.aa_init[0, num - 1, num / 100].q].q;
+ }
+ private static long test_3_13(long num)
+ {
+ return AA.aa_init[num - 100, (AA.aa_init[0, num - 1, num / 100].q | 1) - 2, 1 + AA.aa_zero[0, num - 1, num / 100].q].q;
+ }
+ private static long test_3_14(long num)
+ {
+ object bb = AA.aa_init[0, num - 1, num / 100].q;
+ return (long)bb;
+ }
+ private static long test_3_15(long num)
+ {
+ double dbl = AA.aa_init[0, num - 1, num / 100].q;
+ return (long)dbl;
+ }
+ private static long test_3_16(long num)
+ {
+ return AA.call_target(AA.aa_init[0, num - 1, num / 100].q);
+ }
+ private static long test_3_17(long num)
+ {
+ return AA.call_target_ref(ref AA.aa_init[0, num - 1, num / 100].q);
+ }
+ private static long test_4_0(long num)
+ {
+ return BB.f_init.q;
+ }
+ private static long test_4_1(long num)
+ {
+ BB.f_zero.q = num;
+ return BB.f_zero.q;
+ }
+ private static long test_4_2(long num)
+ {
+ return BB.f_init.q + BB.f_zero.q;
+ }
+ private static long test_4_3(long num)
+ {
+ return checked(BB.f_init.q - BB.f_zero.q);
+ }
+ private static long test_4_4(long num)
+ {
+ BB.f_zero.q += num; return BB.f_zero.q;
+ }
+ private static long test_4_5(long num)
+ {
+ BB.f_zero.q += BB.f_init.q; return BB.f_zero.q;
+ }
+ private static long test_4_6(long num)
+ {
+ if (BB.f_init.q == num)
+ return 100;
+ else
+ return BB.f_zero.q;
+ }
+ private static long test_4_7(long num)
+ {
+ return BB.f_init.q < num + 1 ? 100 : -1;
+ }
+ private static long test_4_8(long num)
+ {
+ return (BB.f_init.q > BB.f_zero.q ? 1 : 0) + 99;
+ }
+ private static long test_4_9(long num)
+ {
+ return (BB.f_init.q ^ BB.f_zero.q) | num;
+ }
+ private static long test_4_10(long num)
+ {
+ BB.f_zero.q |= BB.f_init.q;
+ return BB.f_zero.q & num;
+ }
+ private static long test_4_11(long num)
+ {
+ return BB.f_init.q >> (int)BB.f_zero.q;
+ }
+ private static long test_4_12(long num)
+ {
+ return AA.a_init[BB.f_init.q].q;
+ }
+ private static long test_4_13(long num)
+ {
+ return AA.aa_init[num - 100, (BB.f_init.q | 1) - 2, 1 + BB.f_zero.q].q;
+ }
+ private static long test_4_14(long num)
+ {
+ object bb = BB.f_init.q;
+ return (long)bb;
+ }
+ private static long test_4_15(long num)
+ {
+ double dbl = BB.f_init.q;
+ return (long)dbl;
+ }
+ private static long test_4_16(long num)
+ {
+ return AA.call_target(BB.f_init.q);
+ }
+ private static long test_4_17(long num)
+ {
+ return AA.call_target_ref(ref BB.f_init.q);
+ }
+ private static long test_5_0(long num)
+ {
+ return ((AA)AA.b_init).q;
+ }
+ private static long test_6_0(long num, TypedReference tr_init)
+ {
+ return __refvalue(tr_init, AA).q;
+ }
+
+ private static unsafe int Main()
+ {
+ AA.reset();
+ if (test_0_0(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_0() failed.");
+ return 101;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_1(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_1() failed.");
+ return 102;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_2(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_2() failed.");
+ return 103;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_3(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_3() failed.");
+ return 104;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_4(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_4() failed.");
+ return 105;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_5(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_5() failed.");
+ return 106;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_6(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_6() failed.");
+ return 107;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_7(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_7() failed.");
+ return 108;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_8(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_8() failed.");
+ return 109;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_9(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_9() failed.");
+ return 110;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_10(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_10() failed.");
+ return 111;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_11(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_11() failed.");
+ return 112;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_12(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_12() failed.");
+ return 113;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_13(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_13() failed.");
+ return 114;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_14(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_14() failed.");
+ return 115;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_15(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_15() failed.");
+ return 116;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_16(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_16() failed.");
+ return 117;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_17(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_17() failed.");
+ return 118;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_0(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_0() failed.");
+ return 119;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_1(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_1() failed.");
+ return 120;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_2(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_2() failed.");
+ return 121;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_3(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_3() failed.");
+ return 122;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_4(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_4() failed.");
+ return 123;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_5(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_5() failed.");
+ return 124;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_6(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_6() failed.");
+ return 125;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_7(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_7() failed.");
+ return 126;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_8(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_8() failed.");
+ return 127;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_9(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_9() failed.");
+ return 128;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_10(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_10() failed.");
+ return 129;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_11(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_11() failed.");
+ return 130;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_12(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_12() failed.");
+ return 131;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_13(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_13() failed.");
+ return 132;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_14(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_14() failed.");
+ return 133;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_15(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_15() failed.");
+ return 134;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_16(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_16() failed.");
+ return 135;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_17(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_17() failed.");
+ return 136;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_0(100) != 100)
+ {
+ Console.WriteLine("test_2_0() failed.");
+ return 137;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_1(100) != 100)
+ {
+ Console.WriteLine("test_2_1() failed.");
+ return 138;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_2(100) != 100)
+ {
+ Console.WriteLine("test_2_2() failed.");
+ return 139;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_3(100) != 100)
+ {
+ Console.WriteLine("test_2_3() failed.");
+ return 140;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_4(100) != 100)
+ {
+ Console.WriteLine("test_2_4() failed.");
+ return 141;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_5(100) != 100)
+ {
+ Console.WriteLine("test_2_5() failed.");
+ return 142;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_6(100) != 100)
+ {
+ Console.WriteLine("test_2_6() failed.");
+ return 143;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_7(100) != 100)
+ {
+ Console.WriteLine("test_2_7() failed.");
+ return 144;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_8(100) != 100)
+ {
+ Console.WriteLine("test_2_8() failed.");
+ return 145;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_9(100) != 100)
+ {
+ Console.WriteLine("test_2_9() failed.");
+ return 146;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_10(100) != 100)
+ {
+ Console.WriteLine("test_2_10() failed.");
+ return 147;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_11(100) != 100)
+ {
+ Console.WriteLine("test_2_11() failed.");
+ return 148;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_12(100) != 100)
+ {
+ Console.WriteLine("test_2_12() failed.");
+ return 149;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_13(100) != 100)
+ {
+ Console.WriteLine("test_2_13() failed.");
+ return 150;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_14(100) != 100)
+ {
+ Console.WriteLine("test_2_14() failed.");
+ return 151;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_15(100) != 100)
+ {
+ Console.WriteLine("test_2_15() failed.");
+ return 152;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_16(100) != 100)
+ {
+ Console.WriteLine("test_2_16() failed.");
+ return 153;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_17(100) != 100)
+ {
+ Console.WriteLine("test_2_17() failed.");
+ return 154;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_0(100) != 100)
+ {
+ Console.WriteLine("test_3_0() failed.");
+ return 155;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_1(100) != 100)
+ {
+ Console.WriteLine("test_3_1() failed.");
+ return 156;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_2(100) != 100)
+ {
+ Console.WriteLine("test_3_2() failed.");
+ return 157;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_3(100) != 100)
+ {
+ Console.WriteLine("test_3_3() failed.");
+ return 158;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_4(100) != 100)
+ {
+ Console.WriteLine("test_3_4() failed.");
+ return 159;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_5(100) != 100)
+ {
+ Console.WriteLine("test_3_5() failed.");
+ return 160;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_6(100) != 100)
+ {
+ Console.WriteLine("test_3_6() failed.");
+ return 161;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_7(100) != 100)
+ {
+ Console.WriteLine("test_3_7() failed.");
+ return 162;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_8(100) != 100)
+ {
+ Console.WriteLine("test_3_8() failed.");
+ return 163;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_9(100) != 100)
+ {
+ Console.WriteLine("test_3_9() failed.");
+ return 164;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_10(100) != 100)
+ {
+ Console.WriteLine("test_3_10() failed.");
+ return 165;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_11(100) != 100)
+ {
+ Console.WriteLine("test_3_11() failed.");
+ return 166;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_12(100) != 100)
+ {
+ Console.WriteLine("test_3_12() failed.");
+ return 167;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_13(100) != 100)
+ {
+ Console.WriteLine("test_3_13() failed.");
+ return 168;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_14(100) != 100)
+ {
+ Console.WriteLine("test_3_14() failed.");
+ return 169;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_15(100) != 100)
+ {
+ Console.WriteLine("test_3_15() failed.");
+ return 170;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_16(100) != 100)
+ {
+ Console.WriteLine("test_3_16() failed.");
+ return 171;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_17(100) != 100)
+ {
+ Console.WriteLine("test_3_17() failed.");
+ return 172;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_0(100) != 100)
+ {
+ Console.WriteLine("test_4_0() failed.");
+ return 173;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_1(100) != 100)
+ {
+ Console.WriteLine("test_4_1() failed.");
+ return 174;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_2(100) != 100)
+ {
+ Console.WriteLine("test_4_2() failed.");
+ return 175;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_3(100) != 100)
+ {
+ Console.WriteLine("test_4_3() failed.");
+ return 176;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_4(100) != 100)
+ {
+ Console.WriteLine("test_4_4() failed.");
+ return 177;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_5(100) != 100)
+ {
+ Console.WriteLine("test_4_5() failed.");
+ return 178;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_6(100) != 100)
+ {
+ Console.WriteLine("test_4_6() failed.");
+ return 179;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_7(100) != 100)
+ {
+ Console.WriteLine("test_4_7() failed.");
+ return 180;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_8(100) != 100)
+ {
+ Console.WriteLine("test_4_8() failed.");
+ return 181;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_9(100) != 100)
+ {
+ Console.WriteLine("test_4_9() failed.");
+ return 182;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_10(100) != 100)
+ {
+ Console.WriteLine("test_4_10() failed.");
+ return 183;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_11(100) != 100)
+ {
+ Console.WriteLine("test_4_11() failed.");
+ return 184;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_12(100) != 100)
+ {
+ Console.WriteLine("test_4_12() failed.");
+ return 185;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_13(100) != 100)
+ {
+ Console.WriteLine("test_4_13() failed.");
+ return 186;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_14(100) != 100)
+ {
+ Console.WriteLine("test_4_14() failed.");
+ return 187;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_15(100) != 100)
+ {
+ Console.WriteLine("test_4_15() failed.");
+ return 188;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_16(100) != 100)
+ {
+ Console.WriteLine("test_4_16() failed.");
+ return 189;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_17(100) != 100)
+ {
+ Console.WriteLine("test_4_17() failed.");
+ return 190;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_5_0(100) != 100)
+ {
+ Console.WriteLine("test_5_0() failed.");
+ return 191;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_6_0(100, __makeref(AA._init)) != 100)
+ {
+ Console.WriteLine("test_6_0() failed.");
+ return 192;
+ }
+ AA.verify_all(); Console.WriteLine("All tests passed.");
+ return 100;
+ }
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/body_safe_obj.cs b/tests/src/JIT/Methodical/explicit/coverage/body_safe_obj.cs
new file mode 100644
index 0000000000..b65377e780
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/body_safe_obj.cs
@@ -0,0 +1,819 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+
+internal class TestApp
+{
+ private static int test_0_0(int num, AA init, AA zero)
+ {
+ return init.q.val;
+ }
+ private static int test_0_1(int num, AA init, AA zero)
+ {
+ zero.q.val = num;
+ return zero.q.val;
+ }
+ private static int test_0_2(int num, AA init, AA zero)
+ {
+ if (init.q != zero.q)
+ return 100;
+ else
+ return zero.q.val;
+ }
+ private static int test_0_3(int num, AA init, AA zero)
+ {
+ return init.q.val < num + 1 ? 100 : -1;
+ }
+ private static int test_0_4(int num, AA init, AA zero)
+ {
+ return (init.q.val > zero.q.val ? 1 : 0) + 99;
+ }
+ private static int test_0_5(int num, AA init, AA zero)
+ {
+ return (init.q.val ^ zero.q.val) | num;
+ }
+ private static int test_0_6(int num, AA init, AA zero)
+ {
+ zero.q.val |= init.q.val;
+ return zero.q.val & num;
+ }
+ private static int test_0_7(int num, AA init, AA zero)
+ {
+ return init.q.val >> zero.q.val;
+ }
+ private static int test_0_8(int num, AA init, AA zero)
+ {
+ return AA.a_init[init.q.val].q.val;
+ }
+ private static int test_0_9(int num, AA init, AA zero)
+ {
+ return AA.aa_init[num - 100, (init.q.val | 1) - 2, 1 + zero.q.val].q.val;
+ }
+ private static int test_0_10(int num, AA init, AA zero)
+ {
+ object bb = init.q.val;
+ return (int)bb;
+ }
+ private static int test_0_11(int num, AA init, AA zero)
+ {
+ double dbl = init.q.val;
+ return (int)dbl;
+ }
+ private static int test_0_12(int num, AA init, AA zero)
+ {
+ return AA.call_target(init.q).val;
+ }
+ private static int test_0_13(int num, AA init, AA zero)
+ {
+ return AA.call_target_ref(ref init.q).val;
+ }
+ private static int test_0_14(int num, AA init, AA zero)
+ {
+ return init.q.ret_code();
+ }
+ private static int test_1_0(int num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q.val;
+ }
+ private static int test_1_1(int num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q.val = num;
+ return r_zero.q.val;
+ }
+ private static int test_1_2(int num, ref AA r_init, ref AA r_zero)
+ {
+ if (r_init.q != r_zero.q)
+ return 100;
+ else
+ return r_zero.q.val;
+ }
+ private static int test_1_3(int num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q.val < num + 1 ? 100 : -1;
+ }
+ private static int test_1_4(int num, ref AA r_init, ref AA r_zero)
+ {
+ return (r_init.q.val > r_zero.q.val ? 1 : 0) + 99;
+ }
+ private static int test_1_5(int num, ref AA r_init, ref AA r_zero)
+ {
+ return (r_init.q.val ^ r_zero.q.val) | num;
+ }
+ private static int test_1_6(int num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q.val |= r_init.q.val;
+ return r_zero.q.val & num;
+ }
+ private static int test_1_7(int num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q.val >> r_zero.q.val;
+ }
+ private static int test_1_8(int num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.a_init[r_init.q.val].q.val;
+ }
+ private static int test_1_9(int num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.aa_init[num - 100, (r_init.q.val | 1) - 2, 1 + r_zero.q.val].q.val;
+ }
+ private static int test_1_10(int num, ref AA r_init, ref AA r_zero)
+ {
+ object bb = r_init.q.val;
+ return (int)bb;
+ }
+ private static int test_1_11(int num, ref AA r_init, ref AA r_zero)
+ {
+ double dbl = r_init.q.val;
+ return (int)dbl;
+ }
+ private static int test_1_12(int num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.call_target(r_init.q).val;
+ }
+ private static int test_1_13(int num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.call_target_ref(ref r_init.q).val;
+ }
+ private static int test_1_14(int num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q.ret_code();
+ }
+ private static int test_2_0(int num)
+ {
+ return AA.a_init[num].q.val;
+ }
+ private static int test_2_1(int num)
+ {
+ AA.a_zero[num].q.val = num;
+ return AA.a_zero[num].q.val;
+ }
+ private static int test_2_2(int num)
+ {
+ if (AA.a_init[num].q != AA.a_zero[num].q)
+ return 100;
+ else
+ return AA.a_zero[num].q.val;
+ }
+ private static int test_2_3(int num)
+ {
+ return AA.a_init[num].q.val < num + 1 ? 100 : -1;
+ }
+ private static int test_2_4(int num)
+ {
+ return (AA.a_init[num].q.val > AA.a_zero[num].q.val ? 1 : 0) + 99;
+ }
+ private static int test_2_5(int num)
+ {
+ return (AA.a_init[num].q.val ^ AA.a_zero[num].q.val) | num;
+ }
+ private static int test_2_6(int num)
+ {
+ AA.a_zero[num].q.val |= AA.a_init[num].q.val;
+ return AA.a_zero[num].q.val & num;
+ }
+ private static int test_2_7(int num)
+ {
+ return AA.a_init[num].q.val >> AA.a_zero[num].q.val;
+ }
+ private static int test_2_8(int num)
+ {
+ return AA.a_init[AA.a_init[num].q.val].q.val;
+ }
+ private static int test_2_9(int num)
+ {
+ return AA.aa_init[num - 100, (AA.a_init[num].q.val | 1) - 2, 1 + AA.a_zero[num].q.val].q.val;
+ }
+ private static int test_2_10(int num)
+ {
+ object bb = AA.a_init[num].q.val;
+ return (int)bb;
+ }
+ private static int test_2_11(int num)
+ {
+ double dbl = AA.a_init[num].q.val;
+ return (int)dbl;
+ }
+ private static int test_2_12(int num)
+ {
+ return AA.call_target(AA.a_init[num].q).val;
+ }
+ private static int test_2_13(int num)
+ {
+ return AA.call_target_ref(ref AA.a_init[num].q).val;
+ }
+ private static int test_2_14(int num)
+ {
+ return AA.a_init[num].q.ret_code();
+ }
+ private static int test_3_0(int num)
+ {
+ return AA.aa_init[0, num - 1, num / 100].q.val;
+ }
+ private static int test_3_1(int num)
+ {
+ AA.aa_zero[0, num - 1, num / 100].q.val = num;
+ return AA.aa_zero[0, num - 1, num / 100].q.val;
+ }
+ private static int test_3_2(int num)
+ {
+ if (AA.aa_init[0, num - 1, num / 100].q != AA.aa_zero[0, num - 1, num / 100].q)
+ return 100;
+ else
+ return AA.aa_zero[0, num - 1, num / 100].q.val;
+ }
+ private static int test_3_3(int num)
+ {
+ return AA.aa_init[0, num - 1, num / 100].q.val < num + 1 ? 100 : -1;
+ }
+ private static int test_3_4(int num)
+ {
+ return (AA.aa_init[0, num - 1, num / 100].q.val > AA.aa_zero[0, num - 1, num / 100].q.val ? 1 : 0) + 99;
+ }
+ private static int test_3_5(int num)
+ {
+ return (AA.aa_init[0, num - 1, num / 100].q.val ^ AA.aa_zero[0, num - 1, num / 100].q.val) | num;
+ }
+ private static int test_3_6(int num)
+ {
+ AA.aa_zero[0, num - 1, num / 100].q.val |= AA.aa_init[0, num - 1, num / 100].q.val;
+ return AA.aa_zero[0, num - 1, num / 100].q.val & num;
+ }
+ private static int test_3_7(int num)
+ {
+ return AA.aa_init[0, num - 1, num / 100].q.val >> AA.aa_zero[0, num - 1, num / 100].q.val;
+ }
+ private static int test_3_8(int num)
+ {
+ return AA.a_init[AA.aa_init[0, num - 1, num / 100].q.val].q.val;
+ }
+ private static int test_3_9(int num)
+ {
+ return AA.aa_init[num - 100, (AA.aa_init[0, num - 1, num / 100].q.val | 1) - 2, 1 + AA.aa_zero[0, num - 1, num / 100].q.val].q.val;
+ }
+ private static int test_3_10(int num)
+ {
+ object bb = AA.aa_init[0, num - 1, num / 100].q.val;
+ return (int)bb;
+ }
+ private static int test_3_11(int num)
+ {
+ double dbl = AA.aa_init[0, num - 1, num / 100].q.val;
+ return (int)dbl;
+ }
+ private static int test_3_12(int num)
+ {
+ return AA.call_target(AA.aa_init[0, num - 1, num / 100].q).val;
+ }
+ private static int test_3_13(int num)
+ {
+ return AA.call_target_ref(ref AA.aa_init[0, num - 1, num / 100].q).val;
+ }
+ private static int test_3_14(int num)
+ {
+ return AA.aa_init[0, num - 1, num / 100].q.ret_code();
+ }
+ private static int test_4_0(int num)
+ {
+ return BB.f_init.q.val;
+ }
+ private static int test_4_1(int num)
+ {
+ BB.f_zero.q.val = num;
+ return BB.f_zero.q.val;
+ }
+ private static int test_4_2(int num)
+ {
+ if (BB.f_init.q != BB.f_zero.q)
+ return 100;
+ else
+ return BB.f_zero.q.val;
+ }
+ private static int test_4_3(int num)
+ {
+ return BB.f_init.q.val < num + 1 ? 100 : -1;
+ }
+ private static int test_4_4(int num)
+ {
+ return (BB.f_init.q.val > BB.f_zero.q.val ? 1 : 0) + 99;
+ }
+ private static int test_4_5(int num)
+ {
+ return (BB.f_init.q.val ^ BB.f_zero.q.val) | num;
+ }
+ private static int test_4_6(int num)
+ {
+ BB.f_zero.q.val |= BB.f_init.q.val;
+ return BB.f_zero.q.val & num;
+ }
+ private static int test_4_7(int num)
+ {
+ return BB.f_init.q.val >> BB.f_zero.q.val;
+ }
+ private static int test_4_8(int num)
+ {
+ return AA.a_init[BB.f_init.q.val].q.val;
+ }
+ private static int test_4_9(int num)
+ {
+ return AA.aa_init[num - 100, (BB.f_init.q.val | 1) - 2, 1 + BB.f_zero.q.val].q.val;
+ }
+ private static int test_4_10(int num)
+ {
+ object bb = BB.f_init.q.val;
+ return (int)bb;
+ }
+ private static int test_4_11(int num)
+ {
+ double dbl = BB.f_init.q.val;
+ return (int)dbl;
+ }
+ private static int test_4_12(int num)
+ {
+ return AA.call_target(BB.f_init.q).val;
+ }
+ private static int test_4_13(int num)
+ {
+ return AA.call_target_ref(ref BB.f_init.q).val;
+ }
+ private static int test_4_14(int num)
+ {
+ return BB.f_init.q.ret_code();
+ }
+ private static int test_5_0(int num)
+ {
+ return ((AA)AA.b_init).q.val;
+ }
+ private static int test_6_0(int num, TypedReference tr_init)
+ {
+ return __refvalue(tr_init, AA).q.val;
+ }
+
+ private static unsafe int Main()
+ {
+ AA.reset();
+ if (test_0_0(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_0() failed.");
+ return 101;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_1(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_1() failed.");
+ return 102;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_2(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_2() failed.");
+ return 103;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_3(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_3() failed.");
+ return 104;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_4(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_4() failed.");
+ return 105;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_5(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_5() failed.");
+ return 106;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_6(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_6() failed.");
+ return 107;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_7(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_7() failed.");
+ return 108;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_8(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_8() failed.");
+ return 109;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_9(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_9() failed.");
+ return 110;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_10(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_10() failed.");
+ return 111;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_11(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_11() failed.");
+ return 112;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_12(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_12() failed.");
+ return 113;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_13(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_13() failed.");
+ return 114;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_14(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_14() failed.");
+ return 115;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_0(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_0() failed.");
+ return 116;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_1(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_1() failed.");
+ return 117;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_2(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_2() failed.");
+ return 118;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_3(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_3() failed.");
+ return 119;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_4(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_4() failed.");
+ return 120;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_5(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_5() failed.");
+ return 121;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_6(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_6() failed.");
+ return 122;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_7(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_7() failed.");
+ return 123;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_8(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_8() failed.");
+ return 124;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_9(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_9() failed.");
+ return 125;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_10(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_10() failed.");
+ return 126;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_11(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_11() failed.");
+ return 127;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_12(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_12() failed.");
+ return 128;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_13(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_13() failed.");
+ return 129;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_14(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_14() failed.");
+ return 130;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_0(100) != 100)
+ {
+ Console.WriteLine("test_2_0() failed.");
+ return 131;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_1(100) != 100)
+ {
+ Console.WriteLine("test_2_1() failed.");
+ return 132;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_2(100) != 100)
+ {
+ Console.WriteLine("test_2_2() failed.");
+ return 133;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_3(100) != 100)
+ {
+ Console.WriteLine("test_2_3() failed.");
+ return 134;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_4(100) != 100)
+ {
+ Console.WriteLine("test_2_4() failed.");
+ return 135;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_5(100) != 100)
+ {
+ Console.WriteLine("test_2_5() failed.");
+ return 136;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_6(100) != 100)
+ {
+ Console.WriteLine("test_2_6() failed.");
+ return 137;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_7(100) != 100)
+ {
+ Console.WriteLine("test_2_7() failed.");
+ return 138;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_8(100) != 100)
+ {
+ Console.WriteLine("test_2_8() failed.");
+ return 139;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_9(100) != 100)
+ {
+ Console.WriteLine("test_2_9() failed.");
+ return 140;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_10(100) != 100)
+ {
+ Console.WriteLine("test_2_10() failed.");
+ return 141;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_11(100) != 100)
+ {
+ Console.WriteLine("test_2_11() failed.");
+ return 142;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_12(100) != 100)
+ {
+ Console.WriteLine("test_2_12() failed.");
+ return 143;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_13(100) != 100)
+ {
+ Console.WriteLine("test_2_13() failed.");
+ return 144;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_14(100) != 100)
+ {
+ Console.WriteLine("test_2_14() failed.");
+ return 145;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_0(100) != 100)
+ {
+ Console.WriteLine("test_3_0() failed.");
+ return 146;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_1(100) != 100)
+ {
+ Console.WriteLine("test_3_1() failed.");
+ return 147;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_2(100) != 100)
+ {
+ Console.WriteLine("test_3_2() failed.");
+ return 148;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_3(100) != 100)
+ {
+ Console.WriteLine("test_3_3() failed.");
+ return 149;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_4(100) != 100)
+ {
+ Console.WriteLine("test_3_4() failed.");
+ return 150;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_5(100) != 100)
+ {
+ Console.WriteLine("test_3_5() failed.");
+ return 151;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_6(100) != 100)
+ {
+ Console.WriteLine("test_3_6() failed.");
+ return 152;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_7(100) != 100)
+ {
+ Console.WriteLine("test_3_7() failed.");
+ return 153;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_8(100) != 100)
+ {
+ Console.WriteLine("test_3_8() failed.");
+ return 154;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_9(100) != 100)
+ {
+ Console.WriteLine("test_3_9() failed.");
+ return 155;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_10(100) != 100)
+ {
+ Console.WriteLine("test_3_10() failed.");
+ return 156;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_11(100) != 100)
+ {
+ Console.WriteLine("test_3_11() failed.");
+ return 157;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_12(100) != 100)
+ {
+ Console.WriteLine("test_3_12() failed.");
+ return 158;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_13(100) != 100)
+ {
+ Console.WriteLine("test_3_13() failed.");
+ return 159;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_14(100) != 100)
+ {
+ Console.WriteLine("test_3_14() failed.");
+ return 160;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_0(100) != 100)
+ {
+ Console.WriteLine("test_4_0() failed.");
+ return 161;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_1(100) != 100)
+ {
+ Console.WriteLine("test_4_1() failed.");
+ return 162;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_2(100) != 100)
+ {
+ Console.WriteLine("test_4_2() failed.");
+ return 163;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_3(100) != 100)
+ {
+ Console.WriteLine("test_4_3() failed.");
+ return 164;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_4(100) != 100)
+ {
+ Console.WriteLine("test_4_4() failed.");
+ return 165;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_5(100) != 100)
+ {
+ Console.WriteLine("test_4_5() failed.");
+ return 166;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_6(100) != 100)
+ {
+ Console.WriteLine("test_4_6() failed.");
+ return 167;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_7(100) != 100)
+ {
+ Console.WriteLine("test_4_7() failed.");
+ return 168;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_8(100) != 100)
+ {
+ Console.WriteLine("test_4_8() failed.");
+ return 169;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_9(100) != 100)
+ {
+ Console.WriteLine("test_4_9() failed.");
+ return 170;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_10(100) != 100)
+ {
+ Console.WriteLine("test_4_10() failed.");
+ return 171;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_11(100) != 100)
+ {
+ Console.WriteLine("test_4_11() failed.");
+ return 172;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_12(100) != 100)
+ {
+ Console.WriteLine("test_4_12() failed.");
+ return 173;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_13(100) != 100)
+ {
+ Console.WriteLine("test_4_13() failed.");
+ return 174;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_14(100) != 100)
+ {
+ Console.WriteLine("test_4_14() failed.");
+ return 175;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_5_0(100) != 100)
+ {
+ Console.WriteLine("test_5_0() failed.");
+ return 176;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_6_0(100, __makeref(AA._init)) != 100)
+ {
+ Console.WriteLine("test_6_0() failed.");
+ return 177;
+ }
+ AA.verify_all(); Console.WriteLine("All tests passed.");
+ return 100;
+ }
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/body_safe_short.cs b/tests/src/JIT/Methodical/explicit/coverage/body_safe_short.cs
new file mode 100644
index 0000000000..ca2c8f2a80
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/body_safe_short.cs
@@ -0,0 +1,969 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+
+internal class TestApp
+{
+ private static short test_0_0(short num, AA init, AA zero)
+ {
+ return init.q;
+ }
+ private static short test_0_1(short num, AA init, AA zero)
+ {
+ zero.q = num;
+ return zero.q;
+ }
+ private static short test_0_2(short num, AA init, AA zero)
+ {
+ return (short)(init.q + zero.q);
+ }
+ private static short test_0_3(short num, AA init, AA zero)
+ {
+ return (short)checked(init.q - zero.q);
+ }
+ private static short test_0_4(short num, AA init, AA zero)
+ {
+ zero.q += num; return zero.q;
+ }
+ private static short test_0_5(short num, AA init, AA zero)
+ {
+ zero.q += init.q; return zero.q;
+ }
+ private static short test_0_6(short num, AA init, AA zero)
+ {
+ if (init.q == num)
+ return 100;
+ else
+ return zero.q;
+ }
+ private static short test_0_7(short num, AA init, AA zero)
+ {
+ return (short)(init.q < num + 1 ? 100 : -1);
+ }
+ private static short test_0_8(short num, AA init, AA zero)
+ {
+ return (short)((init.q > zero.q ? 1 : 0) + 99);
+ }
+ private static short test_0_9(short num, AA init, AA zero)
+ {
+ return (short)((init.q ^ zero.q) | num);
+ }
+ private static short test_0_10(short num, AA init, AA zero)
+ {
+ zero.q |= init.q;
+ return (short)(zero.q & num);
+ }
+ private static short test_0_11(short num, AA init, AA zero)
+ {
+ return (short)(init.q >> zero.q);
+ }
+ private static short test_0_12(short num, AA init, AA zero)
+ {
+ return AA.a_init[init.q].q;
+ }
+ private static short test_0_13(short num, AA init, AA zero)
+ {
+ return AA.aa_init[num - 100, (init.q | 1) - 2, 1 + zero.q].q;
+ }
+ private static short test_0_14(short num, AA init, AA zero)
+ {
+ object bb = init.q;
+ return (short)bb;
+ }
+ private static short test_0_15(short num, AA init, AA zero)
+ {
+ double dbl = init.q;
+ return (short)dbl;
+ }
+ private static short test_0_16(short num, AA init, AA zero)
+ {
+ return AA.call_target(init.q);
+ }
+ private static short test_0_17(short num, AA init, AA zero)
+ {
+ return AA.call_target_ref(ref init.q);
+ }
+ private static short test_1_0(short num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q;
+ }
+ private static short test_1_1(short num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q = num;
+ return r_zero.q;
+ }
+ private static short test_1_2(short num, ref AA r_init, ref AA r_zero)
+ {
+ return (short)(r_init.q + r_zero.q);
+ }
+ private static short test_1_3(short num, ref AA r_init, ref AA r_zero)
+ {
+ return (short)checked(r_init.q - r_zero.q);
+ }
+ private static short test_1_4(short num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q += num; return r_zero.q;
+ }
+ private static short test_1_5(short num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q += r_init.q; return r_zero.q;
+ }
+ private static short test_1_6(short num, ref AA r_init, ref AA r_zero)
+ {
+ if (r_init.q == num)
+ return 100;
+ else
+ return r_zero.q;
+ }
+ private static short test_1_7(short num, ref AA r_init, ref AA r_zero)
+ {
+ return (short)(r_init.q < num + 1 ? 100 : -1);
+ }
+ private static short test_1_8(short num, ref AA r_init, ref AA r_zero)
+ {
+ return (short)((r_init.q > r_zero.q ? 1 : 0) + 99);
+ }
+ private static short test_1_9(short num, ref AA r_init, ref AA r_zero)
+ {
+ return (short)((r_init.q ^ r_zero.q) | num);
+ }
+ private static short test_1_10(short num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q |= r_init.q;
+ return (short)(r_zero.q & num);
+ }
+ private static short test_1_11(short num, ref AA r_init, ref AA r_zero)
+ {
+ return (short)(r_init.q >> r_zero.q);
+ }
+ private static short test_1_12(short num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.a_init[r_init.q].q;
+ }
+ private static short test_1_13(short num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.aa_init[num - 100, (r_init.q | 1) - 2, 1 + r_zero.q].q;
+ }
+ private static short test_1_14(short num, ref AA r_init, ref AA r_zero)
+ {
+ object bb = r_init.q;
+ return (short)bb;
+ }
+ private static short test_1_15(short num, ref AA r_init, ref AA r_zero)
+ {
+ double dbl = r_init.q;
+ return (short)dbl;
+ }
+ private static short test_1_16(short num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.call_target(r_init.q);
+ }
+ private static short test_1_17(short num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.call_target_ref(ref r_init.q);
+ }
+ private static short test_2_0(short num)
+ {
+ return AA.a_init[num].q;
+ }
+ private static short test_2_1(short num)
+ {
+ AA.a_zero[num].q = num;
+ return AA.a_zero[num].q;
+ }
+ private static short test_2_2(short num)
+ {
+ return (short)(AA.a_init[num].q + AA.a_zero[num].q);
+ }
+ private static short test_2_3(short num)
+ {
+ return (short)checked(AA.a_init[num].q - AA.a_zero[num].q);
+ }
+ private static short test_2_4(short num)
+ {
+ AA.a_zero[num].q += num; return AA.a_zero[num].q;
+ }
+ private static short test_2_5(short num)
+ {
+ AA.a_zero[num].q += AA.a_init[num].q; return AA.a_zero[num].q;
+ }
+ private static short test_2_6(short num)
+ {
+ if (AA.a_init[num].q == num)
+ return 100;
+ else
+ return AA.a_zero[num].q;
+ }
+ private static short test_2_7(short num)
+ {
+ return (short)(AA.a_init[num].q < num + 1 ? 100 : -1);
+ }
+ private static short test_2_8(short num)
+ {
+ return (short)((AA.a_init[num].q > AA.a_zero[num].q ? 1 : 0) + 99);
+ }
+ private static short test_2_9(short num)
+ {
+ return (short)((AA.a_init[num].q ^ AA.a_zero[num].q) | num);
+ }
+ private static short test_2_10(short num)
+ {
+ AA.a_zero[num].q |= AA.a_init[num].q;
+ return (short)(AA.a_zero[num].q & num);
+ }
+ private static short test_2_11(short num)
+ {
+ return (short)(AA.a_init[num].q >> AA.a_zero[num].q);
+ }
+ private static short test_2_12(short num)
+ {
+ return AA.a_init[AA.a_init[num].q].q;
+ }
+ private static short test_2_13(short num)
+ {
+ return AA.aa_init[num - 100, (AA.a_init[num].q | 1) - 2, 1 + AA.a_zero[num].q].q;
+ }
+ private static short test_2_14(short num)
+ {
+ object bb = AA.a_init[num].q;
+ return (short)bb;
+ }
+ private static short test_2_15(short num)
+ {
+ double dbl = AA.a_init[num].q;
+ return (short)dbl;
+ }
+ private static short test_2_16(short num)
+ {
+ return AA.call_target(AA.a_init[num].q);
+ }
+ private static short test_2_17(short num)
+ {
+ return AA.call_target_ref(ref AA.a_init[num].q);
+ }
+ private static short test_3_0(short num)
+ {
+ return AA.aa_init[0, num - 1, num / 100].q;
+ }
+ private static short test_3_1(short num)
+ {
+ AA.aa_zero[0, num - 1, num / 100].q = num;
+ return AA.aa_zero[0, num - 1, num / 100].q;
+ }
+ private static short test_3_2(short num)
+ {
+ return (short)(AA.aa_init[0, num - 1, num / 100].q + AA.aa_zero[0, num - 1, num / 100].q);
+ }
+ private static short test_3_3(short num)
+ {
+ return (short)checked(AA.aa_init[0, num - 1, num / 100].q - AA.aa_zero[0, num - 1, num / 100].q);
+ }
+ private static short test_3_4(short num)
+ {
+ AA.aa_zero[0, num - 1, num / 100].q += num; return AA.aa_zero[0, num - 1, num / 100].q;
+ }
+ private static short test_3_5(short num)
+ {
+ AA.aa_zero[0, num - 1, num / 100].q += AA.aa_init[0, num - 1, num / 100].q; return AA.aa_zero[0, num - 1, num / 100].q;
+ }
+ private static short test_3_6(short num)
+ {
+ if (AA.aa_init[0, num - 1, num / 100].q == num)
+ return 100;
+ else
+ return AA.aa_zero[0, num - 1, num / 100].q;
+ }
+ private static short test_3_7(short num)
+ {
+ return (short)(AA.aa_init[0, num - 1, num / 100].q < num + 1 ? 100 : -1);
+ }
+ private static short test_3_8(short num)
+ {
+ return (short)((AA.aa_init[0, num - 1, num / 100].q > AA.aa_zero[0, num - 1, num / 100].q ? 1 : 0) + 99);
+ }
+ private static short test_3_9(short num)
+ {
+ return (short)((AA.aa_init[0, num - 1, num / 100].q ^ AA.aa_zero[0, num - 1, num / 100].q) | num);
+ }
+ private static short test_3_10(short num)
+ {
+ AA.aa_zero[0, num - 1, num / 100].q |= AA.aa_init[0, num - 1, num / 100].q;
+ return (short)(AA.aa_zero[0, num - 1, num / 100].q & num);
+ }
+ private static short test_3_11(short num)
+ {
+ return (short)(AA.aa_init[0, num - 1, num / 100].q >> AA.aa_zero[0, num - 1, num / 100].q);
+ }
+ private static short test_3_12(short num)
+ {
+ return AA.a_init[AA.aa_init[0, num - 1, num / 100].q].q;
+ }
+ private static short test_3_13(short num)
+ {
+ return AA.aa_init[num - 100, (AA.aa_init[0, num - 1, num / 100].q | 1) - 2, 1 + AA.aa_zero[0, num - 1, num / 100].q].q;
+ }
+ private static short test_3_14(short num)
+ {
+ object bb = AA.aa_init[0, num - 1, num / 100].q;
+ return (short)bb;
+ }
+ private static short test_3_15(short num)
+ {
+ double dbl = AA.aa_init[0, num - 1, num / 100].q;
+ return (short)dbl;
+ }
+ private static short test_3_16(short num)
+ {
+ return AA.call_target(AA.aa_init[0, num - 1, num / 100].q);
+ }
+ private static short test_3_17(short num)
+ {
+ return AA.call_target_ref(ref AA.aa_init[0, num - 1, num / 100].q);
+ }
+ private static short test_4_0(short num)
+ {
+ return BB.f_init.q;
+ }
+ private static short test_4_1(short num)
+ {
+ BB.f_zero.q = num;
+ return BB.f_zero.q;
+ }
+ private static short test_4_2(short num)
+ {
+ return (short)(BB.f_init.q + BB.f_zero.q);
+ }
+ private static short test_4_3(short num)
+ {
+ return (short)checked(BB.f_init.q - BB.f_zero.q);
+ }
+ private static short test_4_4(short num)
+ {
+ BB.f_zero.q += num; return BB.f_zero.q;
+ }
+ private static short test_4_5(short num)
+ {
+ BB.f_zero.q += BB.f_init.q; return BB.f_zero.q;
+ }
+ private static short test_4_6(short num)
+ {
+ if (BB.f_init.q == num)
+ return 100;
+ else
+ return BB.f_zero.q;
+ }
+ private static short test_4_7(short num)
+ {
+ return (short)(BB.f_init.q < num + 1 ? 100 : -1);
+ }
+ private static short test_4_8(short num)
+ {
+ return (short)((BB.f_init.q > BB.f_zero.q ? 1 : 0) + 99);
+ }
+ private static short test_4_9(short num)
+ {
+ return (short)((BB.f_init.q ^ BB.f_zero.q) | num);
+ }
+ private static short test_4_10(short num)
+ {
+ BB.f_zero.q |= BB.f_init.q;
+ return (short)(BB.f_zero.q & num);
+ }
+ private static short test_4_11(short num)
+ {
+ return (short)(BB.f_init.q >> BB.f_zero.q);
+ }
+ private static short test_4_12(short num)
+ {
+ return AA.a_init[BB.f_init.q].q;
+ }
+ private static short test_4_13(short num)
+ {
+ return AA.aa_init[num - 100, (BB.f_init.q | 1) - 2, 1 + BB.f_zero.q].q;
+ }
+ private static short test_4_14(short num)
+ {
+ object bb = BB.f_init.q;
+ return (short)bb;
+ }
+ private static short test_4_15(short num)
+ {
+ double dbl = BB.f_init.q;
+ return (short)dbl;
+ }
+ private static short test_4_16(short num)
+ {
+ return AA.call_target(BB.f_init.q);
+ }
+ private static short test_4_17(short num)
+ {
+ return AA.call_target_ref(ref BB.f_init.q);
+ }
+ private static short test_5_0(short num)
+ {
+ return ((AA)AA.b_init).q;
+ }
+ private static short test_6_0(short num, TypedReference tr_init)
+ {
+ return __refvalue(tr_init, AA).q;
+ }
+
+ private static unsafe int Main()
+ {
+ AA.reset();
+ if (test_0_0(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_0() failed.");
+ return 101;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_1(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_1() failed.");
+ return 102;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_2(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_2() failed.");
+ return 103;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_3(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_3() failed.");
+ return 104;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_4(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_4() failed.");
+ return 105;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_5(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_5() failed.");
+ return 106;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_6(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_6() failed.");
+ return 107;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_7(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_7() failed.");
+ return 108;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_8(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_8() failed.");
+ return 109;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_9(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_9() failed.");
+ return 110;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_10(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_10() failed.");
+ return 111;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_11(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_11() failed.");
+ return 112;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_12(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_12() failed.");
+ return 113;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_13(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_13() failed.");
+ return 114;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_14(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_14() failed.");
+ return 115;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_15(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_15() failed.");
+ return 116;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_16(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_16() failed.");
+ return 117;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_17(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_17() failed.");
+ return 118;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_0(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_0() failed.");
+ return 119;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_1(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_1() failed.");
+ return 120;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_2(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_2() failed.");
+ return 121;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_3(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_3() failed.");
+ return 122;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_4(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_4() failed.");
+ return 123;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_5(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_5() failed.");
+ return 124;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_6(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_6() failed.");
+ return 125;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_7(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_7() failed.");
+ return 126;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_8(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_8() failed.");
+ return 127;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_9(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_9() failed.");
+ return 128;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_10(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_10() failed.");
+ return 129;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_11(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_11() failed.");
+ return 130;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_12(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_12() failed.");
+ return 131;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_13(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_13() failed.");
+ return 132;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_14(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_14() failed.");
+ return 133;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_15(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_15() failed.");
+ return 134;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_16(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_16() failed.");
+ return 135;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_17(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_17() failed.");
+ return 136;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_0(100) != 100)
+ {
+ Console.WriteLine("test_2_0() failed.");
+ return 137;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_1(100) != 100)
+ {
+ Console.WriteLine("test_2_1() failed.");
+ return 138;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_2(100) != 100)
+ {
+ Console.WriteLine("test_2_2() failed.");
+ return 139;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_3(100) != 100)
+ {
+ Console.WriteLine("test_2_3() failed.");
+ return 140;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_4(100) != 100)
+ {
+ Console.WriteLine("test_2_4() failed.");
+ return 141;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_5(100) != 100)
+ {
+ Console.WriteLine("test_2_5() failed.");
+ return 142;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_6(100) != 100)
+ {
+ Console.WriteLine("test_2_6() failed.");
+ return 143;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_7(100) != 100)
+ {
+ Console.WriteLine("test_2_7() failed.");
+ return 144;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_8(100) != 100)
+ {
+ Console.WriteLine("test_2_8() failed.");
+ return 145;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_9(100) != 100)
+ {
+ Console.WriteLine("test_2_9() failed.");
+ return 146;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_10(100) != 100)
+ {
+ Console.WriteLine("test_2_10() failed.");
+ return 147;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_11(100) != 100)
+ {
+ Console.WriteLine("test_2_11() failed.");
+ return 148;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_12(100) != 100)
+ {
+ Console.WriteLine("test_2_12() failed.");
+ return 149;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_13(100) != 100)
+ {
+ Console.WriteLine("test_2_13() failed.");
+ return 150;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_14(100) != 100)
+ {
+ Console.WriteLine("test_2_14() failed.");
+ return 151;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_15(100) != 100)
+ {
+ Console.WriteLine("test_2_15() failed.");
+ return 152;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_16(100) != 100)
+ {
+ Console.WriteLine("test_2_16() failed.");
+ return 153;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_17(100) != 100)
+ {
+ Console.WriteLine("test_2_17() failed.");
+ return 154;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_0(100) != 100)
+ {
+ Console.WriteLine("test_3_0() failed.");
+ return 155;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_1(100) != 100)
+ {
+ Console.WriteLine("test_3_1() failed.");
+ return 156;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_2(100) != 100)
+ {
+ Console.WriteLine("test_3_2() failed.");
+ return 157;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_3(100) != 100)
+ {
+ Console.WriteLine("test_3_3() failed.");
+ return 158;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_4(100) != 100)
+ {
+ Console.WriteLine("test_3_4() failed.");
+ return 159;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_5(100) != 100)
+ {
+ Console.WriteLine("test_3_5() failed.");
+ return 160;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_6(100) != 100)
+ {
+ Console.WriteLine("test_3_6() failed.");
+ return 161;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_7(100) != 100)
+ {
+ Console.WriteLine("test_3_7() failed.");
+ return 162;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_8(100) != 100)
+ {
+ Console.WriteLine("test_3_8() failed.");
+ return 163;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_9(100) != 100)
+ {
+ Console.WriteLine("test_3_9() failed.");
+ return 164;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_10(100) != 100)
+ {
+ Console.WriteLine("test_3_10() failed.");
+ return 165;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_11(100) != 100)
+ {
+ Console.WriteLine("test_3_11() failed.");
+ return 166;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_12(100) != 100)
+ {
+ Console.WriteLine("test_3_12() failed.");
+ return 167;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_13(100) != 100)
+ {
+ Console.WriteLine("test_3_13() failed.");
+ return 168;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_14(100) != 100)
+ {
+ Console.WriteLine("test_3_14() failed.");
+ return 169;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_15(100) != 100)
+ {
+ Console.WriteLine("test_3_15() failed.");
+ return 170;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_16(100) != 100)
+ {
+ Console.WriteLine("test_3_16() failed.");
+ return 171;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_17(100) != 100)
+ {
+ Console.WriteLine("test_3_17() failed.");
+ return 172;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_0(100) != 100)
+ {
+ Console.WriteLine("test_4_0() failed.");
+ return 173;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_1(100) != 100)
+ {
+ Console.WriteLine("test_4_1() failed.");
+ return 174;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_2(100) != 100)
+ {
+ Console.WriteLine("test_4_2() failed.");
+ return 175;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_3(100) != 100)
+ {
+ Console.WriteLine("test_4_3() failed.");
+ return 176;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_4(100) != 100)
+ {
+ Console.WriteLine("test_4_4() failed.");
+ return 177;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_5(100) != 100)
+ {
+ Console.WriteLine("test_4_5() failed.");
+ return 178;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_6(100) != 100)
+ {
+ Console.WriteLine("test_4_6() failed.");
+ return 179;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_7(100) != 100)
+ {
+ Console.WriteLine("test_4_7() failed.");
+ return 180;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_8(100) != 100)
+ {
+ Console.WriteLine("test_4_8() failed.");
+ return 181;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_9(100) != 100)
+ {
+ Console.WriteLine("test_4_9() failed.");
+ return 182;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_10(100) != 100)
+ {
+ Console.WriteLine("test_4_10() failed.");
+ return 183;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_11(100) != 100)
+ {
+ Console.WriteLine("test_4_11() failed.");
+ return 184;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_12(100) != 100)
+ {
+ Console.WriteLine("test_4_12() failed.");
+ return 185;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_13(100) != 100)
+ {
+ Console.WriteLine("test_4_13() failed.");
+ return 186;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_14(100) != 100)
+ {
+ Console.WriteLine("test_4_14() failed.");
+ return 187;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_15(100) != 100)
+ {
+ Console.WriteLine("test_4_15() failed.");
+ return 188;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_16(100) != 100)
+ {
+ Console.WriteLine("test_4_16() failed.");
+ return 189;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_17(100) != 100)
+ {
+ Console.WriteLine("test_4_17() failed.");
+ return 190;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_5_0(100) != 100)
+ {
+ Console.WriteLine("test_5_0() failed.");
+ return 191;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_6_0(100, __makeref(AA._init)) != 100)
+ {
+ Console.WriteLine("test_6_0() failed.");
+ return 192;
+ }
+ AA.verify_all(); Console.WriteLine("All tests passed.");
+ return 100;
+ }
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/body_safe_val.cs b/tests/src/JIT/Methodical/explicit/coverage/body_safe_val.cs
new file mode 100644
index 0000000000..a2978f6f79
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/body_safe_val.cs
@@ -0,0 +1,819 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+
+internal class TestApp
+{
+ private static int test_0_0(int num, AA init, AA zero)
+ {
+ return init.q.val;
+ }
+ private static int test_0_1(int num, AA init, AA zero)
+ {
+ zero.q.val = num;
+ return zero.q.val;
+ }
+ private static int test_0_2(int num, AA init, AA zero)
+ {
+ if (init.q.val != zero.q.val)
+ return 100;
+ else
+ return zero.q.val;
+ }
+ private static int test_0_3(int num, AA init, AA zero)
+ {
+ return init.q.val < num + 1 ? 100 : -1;
+ }
+ private static int test_0_4(int num, AA init, AA zero)
+ {
+ return (init.q.val > zero.q.val ? 1 : 0) + 99;
+ }
+ private static int test_0_5(int num, AA init, AA zero)
+ {
+ return (init.q.val ^ zero.q.val) | num;
+ }
+ private static int test_0_6(int num, AA init, AA zero)
+ {
+ zero.q.val |= init.q.val;
+ return zero.q.val & num;
+ }
+ private static int test_0_7(int num, AA init, AA zero)
+ {
+ return init.q.val >> zero.q.val;
+ }
+ private static int test_0_8(int num, AA init, AA zero)
+ {
+ return AA.a_init[init.q.val].q.val;
+ }
+ private static int test_0_9(int num, AA init, AA zero)
+ {
+ return AA.aa_init[num - 100, (init.q.val | 1) - 2, 1 + zero.q.val].q.val;
+ }
+ private static int test_0_10(int num, AA init, AA zero)
+ {
+ object bb = init.q.val;
+ return (int)bb;
+ }
+ private static int test_0_11(int num, AA init, AA zero)
+ {
+ double dbl = init.q.val;
+ return (int)dbl;
+ }
+ private static int test_0_12(int num, AA init, AA zero)
+ {
+ return AA.call_target(init.q).val;
+ }
+ private static int test_0_13(int num, AA init, AA zero)
+ {
+ return AA.call_target_ref(ref init.q).val;
+ }
+ private static int test_0_14(int num, AA init, AA zero)
+ {
+ return init.q.ret_code();
+ }
+ private static int test_1_0(int num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q.val;
+ }
+ private static int test_1_1(int num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q.val = num;
+ return r_zero.q.val;
+ }
+ private static int test_1_2(int num, ref AA r_init, ref AA r_zero)
+ {
+ if (r_init.q.val != r_zero.q.val)
+ return 100;
+ else
+ return r_zero.q.val;
+ }
+ private static int test_1_3(int num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q.val < num + 1 ? 100 : -1;
+ }
+ private static int test_1_4(int num, ref AA r_init, ref AA r_zero)
+ {
+ return (r_init.q.val > r_zero.q.val ? 1 : 0) + 99;
+ }
+ private static int test_1_5(int num, ref AA r_init, ref AA r_zero)
+ {
+ return (r_init.q.val ^ r_zero.q.val) | num;
+ }
+ private static int test_1_6(int num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q.val |= r_init.q.val;
+ return r_zero.q.val & num;
+ }
+ private static int test_1_7(int num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q.val >> r_zero.q.val;
+ }
+ private static int test_1_8(int num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.a_init[r_init.q.val].q.val;
+ }
+ private static int test_1_9(int num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.aa_init[num - 100, (r_init.q.val | 1) - 2, 1 + r_zero.q.val].q.val;
+ }
+ private static int test_1_10(int num, ref AA r_init, ref AA r_zero)
+ {
+ object bb = r_init.q.val;
+ return (int)bb;
+ }
+ private static int test_1_11(int num, ref AA r_init, ref AA r_zero)
+ {
+ double dbl = r_init.q.val;
+ return (int)dbl;
+ }
+ private static int test_1_12(int num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.call_target(r_init.q).val;
+ }
+ private static int test_1_13(int num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.call_target_ref(ref r_init.q).val;
+ }
+ private static int test_1_14(int num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q.ret_code();
+ }
+ private static int test_2_0(int num)
+ {
+ return AA.a_init[num].q.val;
+ }
+ private static int test_2_1(int num)
+ {
+ AA.a_zero[num].q.val = num;
+ return AA.a_zero[num].q.val;
+ }
+ private static int test_2_2(int num)
+ {
+ if (AA.a_init[num].q.val != AA.a_zero[num].q.val)
+ return 100;
+ else
+ return AA.a_zero[num].q.val;
+ }
+ private static int test_2_3(int num)
+ {
+ return AA.a_init[num].q.val < num + 1 ? 100 : -1;
+ }
+ private static int test_2_4(int num)
+ {
+ return (AA.a_init[num].q.val > AA.a_zero[num].q.val ? 1 : 0) + 99;
+ }
+ private static int test_2_5(int num)
+ {
+ return (AA.a_init[num].q.val ^ AA.a_zero[num].q.val) | num;
+ }
+ private static int test_2_6(int num)
+ {
+ AA.a_zero[num].q.val |= AA.a_init[num].q.val;
+ return AA.a_zero[num].q.val & num;
+ }
+ private static int test_2_7(int num)
+ {
+ return AA.a_init[num].q.val >> AA.a_zero[num].q.val;
+ }
+ private static int test_2_8(int num)
+ {
+ return AA.a_init[AA.a_init[num].q.val].q.val;
+ }
+ private static int test_2_9(int num)
+ {
+ return AA.aa_init[num - 100, (AA.a_init[num].q.val | 1) - 2, 1 + AA.a_zero[num].q.val].q.val;
+ }
+ private static int test_2_10(int num)
+ {
+ object bb = AA.a_init[num].q.val;
+ return (int)bb;
+ }
+ private static int test_2_11(int num)
+ {
+ double dbl = AA.a_init[num].q.val;
+ return (int)dbl;
+ }
+ private static int test_2_12(int num)
+ {
+ return AA.call_target(AA.a_init[num].q).val;
+ }
+ private static int test_2_13(int num)
+ {
+ return AA.call_target_ref(ref AA.a_init[num].q).val;
+ }
+ private static int test_2_14(int num)
+ {
+ return AA.a_init[num].q.ret_code();
+ }
+ private static int test_3_0(int num)
+ {
+ return AA.aa_init[0, num - 1, num / 100].q.val;
+ }
+ private static int test_3_1(int num)
+ {
+ AA.aa_zero[0, num - 1, num / 100].q.val = num;
+ return AA.aa_zero[0, num - 1, num / 100].q.val;
+ }
+ private static int test_3_2(int num)
+ {
+ if (AA.aa_init[0, num - 1, num / 100].q.val != AA.aa_zero[0, num - 1, num / 100].q.val)
+ return 100;
+ else
+ return AA.aa_zero[0, num - 1, num / 100].q.val;
+ }
+ private static int test_3_3(int num)
+ {
+ return AA.aa_init[0, num - 1, num / 100].q.val < num + 1 ? 100 : -1;
+ }
+ private static int test_3_4(int num)
+ {
+ return (AA.aa_init[0, num - 1, num / 100].q.val > AA.aa_zero[0, num - 1, num / 100].q.val ? 1 : 0) + 99;
+ }
+ private static int test_3_5(int num)
+ {
+ return (AA.aa_init[0, num - 1, num / 100].q.val ^ AA.aa_zero[0, num - 1, num / 100].q.val) | num;
+ }
+ private static int test_3_6(int num)
+ {
+ AA.aa_zero[0, num - 1, num / 100].q.val |= AA.aa_init[0, num - 1, num / 100].q.val;
+ return AA.aa_zero[0, num - 1, num / 100].q.val & num;
+ }
+ private static int test_3_7(int num)
+ {
+ return AA.aa_init[0, num - 1, num / 100].q.val >> AA.aa_zero[0, num - 1, num / 100].q.val;
+ }
+ private static int test_3_8(int num)
+ {
+ return AA.a_init[AA.aa_init[0, num - 1, num / 100].q.val].q.val;
+ }
+ private static int test_3_9(int num)
+ {
+ return AA.aa_init[num - 100, (AA.aa_init[0, num - 1, num / 100].q.val | 1) - 2, 1 + AA.aa_zero[0, num - 1, num / 100].q.val].q.val;
+ }
+ private static int test_3_10(int num)
+ {
+ object bb = AA.aa_init[0, num - 1, num / 100].q.val;
+ return (int)bb;
+ }
+ private static int test_3_11(int num)
+ {
+ double dbl = AA.aa_init[0, num - 1, num / 100].q.val;
+ return (int)dbl;
+ }
+ private static int test_3_12(int num)
+ {
+ return AA.call_target(AA.aa_init[0, num - 1, num / 100].q).val;
+ }
+ private static int test_3_13(int num)
+ {
+ return AA.call_target_ref(ref AA.aa_init[0, num - 1, num / 100].q).val;
+ }
+ private static int test_3_14(int num)
+ {
+ return AA.aa_init[0, num - 1, num / 100].q.ret_code();
+ }
+ private static int test_4_0(int num)
+ {
+ return BB.f_init.q.val;
+ }
+ private static int test_4_1(int num)
+ {
+ BB.f_zero.q.val = num;
+ return BB.f_zero.q.val;
+ }
+ private static int test_4_2(int num)
+ {
+ if (BB.f_init.q.val != BB.f_zero.q.val)
+ return 100;
+ else
+ return BB.f_zero.q.val;
+ }
+ private static int test_4_3(int num)
+ {
+ return BB.f_init.q.val < num + 1 ? 100 : -1;
+ }
+ private static int test_4_4(int num)
+ {
+ return (BB.f_init.q.val > BB.f_zero.q.val ? 1 : 0) + 99;
+ }
+ private static int test_4_5(int num)
+ {
+ return (BB.f_init.q.val ^ BB.f_zero.q.val) | num;
+ }
+ private static int test_4_6(int num)
+ {
+ BB.f_zero.q.val |= BB.f_init.q.val;
+ return BB.f_zero.q.val & num;
+ }
+ private static int test_4_7(int num)
+ {
+ return BB.f_init.q.val >> BB.f_zero.q.val;
+ }
+ private static int test_4_8(int num)
+ {
+ return AA.a_init[BB.f_init.q.val].q.val;
+ }
+ private static int test_4_9(int num)
+ {
+ return AA.aa_init[num - 100, (BB.f_init.q.val | 1) - 2, 1 + BB.f_zero.q.val].q.val;
+ }
+ private static int test_4_10(int num)
+ {
+ object bb = BB.f_init.q.val;
+ return (int)bb;
+ }
+ private static int test_4_11(int num)
+ {
+ double dbl = BB.f_init.q.val;
+ return (int)dbl;
+ }
+ private static int test_4_12(int num)
+ {
+ return AA.call_target(BB.f_init.q).val;
+ }
+ private static int test_4_13(int num)
+ {
+ return AA.call_target_ref(ref BB.f_init.q).val;
+ }
+ private static int test_4_14(int num)
+ {
+ return BB.f_init.q.ret_code();
+ }
+ private static int test_5_0(int num)
+ {
+ return ((AA)AA.b_init).q.val;
+ }
+ private static int test_6_0(int num, TypedReference tr_init)
+ {
+ return __refvalue(tr_init, AA).q.val;
+ }
+
+ private static unsafe int Main()
+ {
+ AA.reset();
+ if (test_0_0(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_0() failed.");
+ return 101;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_1(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_1() failed.");
+ return 102;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_2(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_2() failed.");
+ return 103;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_3(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_3() failed.");
+ return 104;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_4(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_4() failed.");
+ return 105;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_5(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_5() failed.");
+ return 106;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_6(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_6() failed.");
+ return 107;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_7(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_7() failed.");
+ return 108;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_8(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_8() failed.");
+ return 109;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_9(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_9() failed.");
+ return 110;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_10(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_10() failed.");
+ return 111;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_11(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_11() failed.");
+ return 112;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_12(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_12() failed.");
+ return 113;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_13(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_13() failed.");
+ return 114;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_14(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_14() failed.");
+ return 115;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_0(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_0() failed.");
+ return 116;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_1(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_1() failed.");
+ return 117;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_2(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_2() failed.");
+ return 118;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_3(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_3() failed.");
+ return 119;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_4(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_4() failed.");
+ return 120;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_5(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_5() failed.");
+ return 121;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_6(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_6() failed.");
+ return 122;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_7(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_7() failed.");
+ return 123;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_8(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_8() failed.");
+ return 124;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_9(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_9() failed.");
+ return 125;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_10(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_10() failed.");
+ return 126;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_11(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_11() failed.");
+ return 127;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_12(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_12() failed.");
+ return 128;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_13(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_13() failed.");
+ return 129;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_14(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_14() failed.");
+ return 130;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_0(100) != 100)
+ {
+ Console.WriteLine("test_2_0() failed.");
+ return 131;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_1(100) != 100)
+ {
+ Console.WriteLine("test_2_1() failed.");
+ return 132;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_2(100) != 100)
+ {
+ Console.WriteLine("test_2_2() failed.");
+ return 133;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_3(100) != 100)
+ {
+ Console.WriteLine("test_2_3() failed.");
+ return 134;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_4(100) != 100)
+ {
+ Console.WriteLine("test_2_4() failed.");
+ return 135;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_5(100) != 100)
+ {
+ Console.WriteLine("test_2_5() failed.");
+ return 136;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_6(100) != 100)
+ {
+ Console.WriteLine("test_2_6() failed.");
+ return 137;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_7(100) != 100)
+ {
+ Console.WriteLine("test_2_7() failed.");
+ return 138;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_8(100) != 100)
+ {
+ Console.WriteLine("test_2_8() failed.");
+ return 139;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_9(100) != 100)
+ {
+ Console.WriteLine("test_2_9() failed.");
+ return 140;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_10(100) != 100)
+ {
+ Console.WriteLine("test_2_10() failed.");
+ return 141;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_11(100) != 100)
+ {
+ Console.WriteLine("test_2_11() failed.");
+ return 142;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_12(100) != 100)
+ {
+ Console.WriteLine("test_2_12() failed.");
+ return 143;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_13(100) != 100)
+ {
+ Console.WriteLine("test_2_13() failed.");
+ return 144;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_14(100) != 100)
+ {
+ Console.WriteLine("test_2_14() failed.");
+ return 145;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_0(100) != 100)
+ {
+ Console.WriteLine("test_3_0() failed.");
+ return 146;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_1(100) != 100)
+ {
+ Console.WriteLine("test_3_1() failed.");
+ return 147;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_2(100) != 100)
+ {
+ Console.WriteLine("test_3_2() failed.");
+ return 148;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_3(100) != 100)
+ {
+ Console.WriteLine("test_3_3() failed.");
+ return 149;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_4(100) != 100)
+ {
+ Console.WriteLine("test_3_4() failed.");
+ return 150;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_5(100) != 100)
+ {
+ Console.WriteLine("test_3_5() failed.");
+ return 151;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_6(100) != 100)
+ {
+ Console.WriteLine("test_3_6() failed.");
+ return 152;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_7(100) != 100)
+ {
+ Console.WriteLine("test_3_7() failed.");
+ return 153;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_8(100) != 100)
+ {
+ Console.WriteLine("test_3_8() failed.");
+ return 154;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_9(100) != 100)
+ {
+ Console.WriteLine("test_3_9() failed.");
+ return 155;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_10(100) != 100)
+ {
+ Console.WriteLine("test_3_10() failed.");
+ return 156;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_11(100) != 100)
+ {
+ Console.WriteLine("test_3_11() failed.");
+ return 157;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_12(100) != 100)
+ {
+ Console.WriteLine("test_3_12() failed.");
+ return 158;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_13(100) != 100)
+ {
+ Console.WriteLine("test_3_13() failed.");
+ return 159;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_14(100) != 100)
+ {
+ Console.WriteLine("test_3_14() failed.");
+ return 160;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_0(100) != 100)
+ {
+ Console.WriteLine("test_4_0() failed.");
+ return 161;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_1(100) != 100)
+ {
+ Console.WriteLine("test_4_1() failed.");
+ return 162;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_2(100) != 100)
+ {
+ Console.WriteLine("test_4_2() failed.");
+ return 163;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_3(100) != 100)
+ {
+ Console.WriteLine("test_4_3() failed.");
+ return 164;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_4(100) != 100)
+ {
+ Console.WriteLine("test_4_4() failed.");
+ return 165;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_5(100) != 100)
+ {
+ Console.WriteLine("test_4_5() failed.");
+ return 166;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_6(100) != 100)
+ {
+ Console.WriteLine("test_4_6() failed.");
+ return 167;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_7(100) != 100)
+ {
+ Console.WriteLine("test_4_7() failed.");
+ return 168;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_8(100) != 100)
+ {
+ Console.WriteLine("test_4_8() failed.");
+ return 169;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_9(100) != 100)
+ {
+ Console.WriteLine("test_4_9() failed.");
+ return 170;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_10(100) != 100)
+ {
+ Console.WriteLine("test_4_10() failed.");
+ return 171;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_11(100) != 100)
+ {
+ Console.WriteLine("test_4_11() failed.");
+ return 172;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_12(100) != 100)
+ {
+ Console.WriteLine("test_4_12() failed.");
+ return 173;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_13(100) != 100)
+ {
+ Console.WriteLine("test_4_13() failed.");
+ return 174;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_14(100) != 100)
+ {
+ Console.WriteLine("test_4_14() failed.");
+ return 175;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_5_0(100) != 100)
+ {
+ Console.WriteLine("test_5_0() failed.");
+ return 176;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_6_0(100, __makeref(AA._init)) != 100)
+ {
+ Console.WriteLine("test_6_0() failed.");
+ return 177;
+ }
+ AA.verify_all(); Console.WriteLine("All tests passed.");
+ return 100;
+ }
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/body_short.cs b/tests/src/JIT/Methodical/explicit/coverage/body_short.cs
new file mode 100644
index 0000000000..fe9a0de062
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/body_short.cs
@@ -0,0 +1,1210 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+
+internal class TestApp
+{
+ private static short test_0_0(short num, AA init, AA zero)
+ {
+ return init.q;
+ }
+ private static short test_0_1(short num, AA init, AA zero)
+ {
+ zero.q = num;
+ return zero.q;
+ }
+ private static short test_0_2(short num, AA init, AA zero)
+ {
+ return (short)(init.q + zero.q);
+ }
+ private static short test_0_3(short num, AA init, AA zero)
+ {
+ return (short)checked(init.q - zero.q);
+ }
+ private static short test_0_4(short num, AA init, AA zero)
+ {
+ zero.q += num; return zero.q;
+ }
+ private static short test_0_5(short num, AA init, AA zero)
+ {
+ zero.q += init.q; return zero.q;
+ }
+ private static short test_0_6(short num, AA init, AA zero)
+ {
+ if (init.q == num)
+ return 100;
+ else
+ return zero.q;
+ }
+ private static short test_0_7(short num, AA init, AA zero)
+ {
+ return (short)(init.q < num + 1 ? 100 : -1);
+ }
+ private static short test_0_8(short num, AA init, AA zero)
+ {
+ return (short)((init.q > zero.q ? 1 : 0) + 99);
+ }
+ private static short test_0_9(short num, AA init, AA zero)
+ {
+ return (short)((init.q ^ zero.q) | num);
+ }
+ private static short test_0_10(short num, AA init, AA zero)
+ {
+ zero.q |= init.q;
+ return (short)(zero.q & num);
+ }
+ private static short test_0_11(short num, AA init, AA zero)
+ {
+ return (short)(init.q >> zero.q);
+ }
+ private static short test_0_12(short num, AA init, AA zero)
+ {
+ return AA.a_init[init.q].q;
+ }
+ private static short test_0_13(short num, AA init, AA zero)
+ {
+ return AA.aa_init[num - 100, (init.q | 1) - 2, 1 + zero.q].q;
+ }
+ private static short test_0_14(short num, AA init, AA zero)
+ {
+ object bb = init.q;
+ return (short)bb;
+ }
+ private static short test_0_15(short num, AA init, AA zero)
+ {
+ double dbl = init.q;
+ return (short)dbl;
+ }
+ private static short test_0_16(short num, AA init, AA zero)
+ {
+ return AA.call_target(init.q);
+ }
+ private static short test_0_17(short num, AA init, AA zero)
+ {
+ return AA.call_target_ref(ref init.q);
+ }
+ private static short test_1_0(short num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q;
+ }
+ private static short test_1_1(short num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q = num;
+ return r_zero.q;
+ }
+ private static short test_1_2(short num, ref AA r_init, ref AA r_zero)
+ {
+ return (short)(r_init.q + r_zero.q);
+ }
+ private static short test_1_3(short num, ref AA r_init, ref AA r_zero)
+ {
+ return (short)checked(r_init.q - r_zero.q);
+ }
+ private static short test_1_4(short num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q += num; return r_zero.q;
+ }
+ private static short test_1_5(short num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q += r_init.q; return r_zero.q;
+ }
+ private static short test_1_6(short num, ref AA r_init, ref AA r_zero)
+ {
+ if (r_init.q == num)
+ return 100;
+ else
+ return r_zero.q;
+ }
+ private static short test_1_7(short num, ref AA r_init, ref AA r_zero)
+ {
+ return (short)(r_init.q < num + 1 ? 100 : -1);
+ }
+ private static short test_1_8(short num, ref AA r_init, ref AA r_zero)
+ {
+ return (short)((r_init.q > r_zero.q ? 1 : 0) + 99);
+ }
+ private static short test_1_9(short num, ref AA r_init, ref AA r_zero)
+ {
+ return (short)((r_init.q ^ r_zero.q) | num);
+ }
+ private static short test_1_10(short num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q |= r_init.q;
+ return (short)(r_zero.q & num);
+ }
+ private static short test_1_11(short num, ref AA r_init, ref AA r_zero)
+ {
+ return (short)(r_init.q >> r_zero.q);
+ }
+ private static short test_1_12(short num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.a_init[r_init.q].q;
+ }
+ private static short test_1_13(short num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.aa_init[num - 100, (r_init.q | 1) - 2, 1 + r_zero.q].q;
+ }
+ private static short test_1_14(short num, ref AA r_init, ref AA r_zero)
+ {
+ object bb = r_init.q;
+ return (short)bb;
+ }
+ private static short test_1_15(short num, ref AA r_init, ref AA r_zero)
+ {
+ double dbl = r_init.q;
+ return (short)dbl;
+ }
+ private static short test_1_16(short num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.call_target(r_init.q);
+ }
+ private static short test_1_17(short num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.call_target_ref(ref r_init.q);
+ }
+ private static short test_2_0(short num)
+ {
+ return AA.a_init[num].q;
+ }
+ private static short test_2_1(short num)
+ {
+ AA.a_zero[num].q = num;
+ return AA.a_zero[num].q;
+ }
+ private static short test_2_2(short num)
+ {
+ return (short)(AA.a_init[num].q + AA.a_zero[num].q);
+ }
+ private static short test_2_3(short num)
+ {
+ return (short)checked(AA.a_init[num].q - AA.a_zero[num].q);
+ }
+ private static short test_2_4(short num)
+ {
+ AA.a_zero[num].q += num; return AA.a_zero[num].q;
+ }
+ private static short test_2_5(short num)
+ {
+ AA.a_zero[num].q += AA.a_init[num].q; return AA.a_zero[num].q;
+ }
+ private static short test_2_6(short num)
+ {
+ if (AA.a_init[num].q == num)
+ return 100;
+ else
+ return AA.a_zero[num].q;
+ }
+ private static short test_2_7(short num)
+ {
+ return (short)(AA.a_init[num].q < num + 1 ? 100 : -1);
+ }
+ private static short test_2_8(short num)
+ {
+ return (short)((AA.a_init[num].q > AA.a_zero[num].q ? 1 : 0) + 99);
+ }
+ private static short test_2_9(short num)
+ {
+ return (short)((AA.a_init[num].q ^ AA.a_zero[num].q) | num);
+ }
+ private static short test_2_10(short num)
+ {
+ AA.a_zero[num].q |= AA.a_init[num].q;
+ return (short)(AA.a_zero[num].q & num);
+ }
+ private static short test_2_11(short num)
+ {
+ return (short)(AA.a_init[num].q >> AA.a_zero[num].q);
+ }
+ private static short test_2_12(short num)
+ {
+ return AA.a_init[AA.a_init[num].q].q;
+ }
+ private static short test_2_13(short num)
+ {
+ return AA.aa_init[num - 100, (AA.a_init[num].q | 1) - 2, 1 + AA.a_zero[num].q].q;
+ }
+ private static short test_2_14(short num)
+ {
+ object bb = AA.a_init[num].q;
+ return (short)bb;
+ }
+ private static short test_2_15(short num)
+ {
+ double dbl = AA.a_init[num].q;
+ return (short)dbl;
+ }
+ private static short test_2_16(short num)
+ {
+ return AA.call_target(AA.a_init[num].q);
+ }
+ private static short test_2_17(short num)
+ {
+ return AA.call_target_ref(ref AA.a_init[num].q);
+ }
+ private static short test_3_0(short num)
+ {
+ return AA.aa_init[0, num - 1, num / 100].q;
+ }
+ private static short test_3_1(short num)
+ {
+ AA.aa_zero[0, num - 1, num / 100].q = num;
+ return AA.aa_zero[0, num - 1, num / 100].q;
+ }
+ private static short test_3_2(short num)
+ {
+ return (short)(AA.aa_init[0, num - 1, num / 100].q + AA.aa_zero[0, num - 1, num / 100].q);
+ }
+ private static short test_3_3(short num)
+ {
+ return (short)checked(AA.aa_init[0, num - 1, num / 100].q - AA.aa_zero[0, num - 1, num / 100].q);
+ }
+ private static short test_3_4(short num)
+ {
+ AA.aa_zero[0, num - 1, num / 100].q += num; return AA.aa_zero[0, num - 1, num / 100].q;
+ }
+ private static short test_3_5(short num)
+ {
+ AA.aa_zero[0, num - 1, num / 100].q += AA.aa_init[0, num - 1, num / 100].q; return AA.aa_zero[0, num - 1, num / 100].q;
+ }
+ private static short test_3_6(short num)
+ {
+ if (AA.aa_init[0, num - 1, num / 100].q == num)
+ return 100;
+ else
+ return AA.aa_zero[0, num - 1, num / 100].q;
+ }
+ private static short test_3_7(short num)
+ {
+ return (short)(AA.aa_init[0, num - 1, num / 100].q < num + 1 ? 100 : -1);
+ }
+ private static short test_3_8(short num)
+ {
+ return (short)((AA.aa_init[0, num - 1, num / 100].q > AA.aa_zero[0, num - 1, num / 100].q ? 1 : 0) + 99);
+ }
+ private static short test_3_9(short num)
+ {
+ return (short)((AA.aa_init[0, num - 1, num / 100].q ^ AA.aa_zero[0, num - 1, num / 100].q) | num);
+ }
+ private static short test_3_10(short num)
+ {
+ AA.aa_zero[0, num - 1, num / 100].q |= AA.aa_init[0, num - 1, num / 100].q;
+ return (short)(AA.aa_zero[0, num - 1, num / 100].q & num);
+ }
+ private static short test_3_11(short num)
+ {
+ return (short)(AA.aa_init[0, num - 1, num / 100].q >> AA.aa_zero[0, num - 1, num / 100].q);
+ }
+ private static short test_3_12(short num)
+ {
+ return AA.a_init[AA.aa_init[0, num - 1, num / 100].q].q;
+ }
+ private static short test_3_13(short num)
+ {
+ return AA.aa_init[num - 100, (AA.aa_init[0, num - 1, num / 100].q | 1) - 2, 1 + AA.aa_zero[0, num - 1, num / 100].q].q;
+ }
+ private static short test_3_14(short num)
+ {
+ object bb = AA.aa_init[0, num - 1, num / 100].q;
+ return (short)bb;
+ }
+ private static short test_3_15(short num)
+ {
+ double dbl = AA.aa_init[0, num - 1, num / 100].q;
+ return (short)dbl;
+ }
+ private static short test_3_16(short num)
+ {
+ return AA.call_target(AA.aa_init[0, num - 1, num / 100].q);
+ }
+ private static short test_3_17(short num)
+ {
+ return AA.call_target_ref(ref AA.aa_init[0, num - 1, num / 100].q);
+ }
+ private static short test_4_0(short num)
+ {
+ return BB.f_init.q;
+ }
+ private static short test_4_1(short num)
+ {
+ BB.f_zero.q = num;
+ return BB.f_zero.q;
+ }
+ private static short test_4_2(short num)
+ {
+ return (short)(BB.f_init.q + BB.f_zero.q);
+ }
+ private static short test_4_3(short num)
+ {
+ return (short)checked(BB.f_init.q - BB.f_zero.q);
+ }
+ private static short test_4_4(short num)
+ {
+ BB.f_zero.q += num; return BB.f_zero.q;
+ }
+ private static short test_4_5(short num)
+ {
+ BB.f_zero.q += BB.f_init.q; return BB.f_zero.q;
+ }
+ private static short test_4_6(short num)
+ {
+ if (BB.f_init.q == num)
+ return 100;
+ else
+ return BB.f_zero.q;
+ }
+ private static short test_4_7(short num)
+ {
+ return (short)(BB.f_init.q < num + 1 ? 100 : -1);
+ }
+ private static short test_4_8(short num)
+ {
+ return (short)((BB.f_init.q > BB.f_zero.q ? 1 : 0) + 99);
+ }
+ private static short test_4_9(short num)
+ {
+ return (short)((BB.f_init.q ^ BB.f_zero.q) | num);
+ }
+ private static short test_4_10(short num)
+ {
+ BB.f_zero.q |= BB.f_init.q;
+ return (short)(BB.f_zero.q & num);
+ }
+ private static short test_4_11(short num)
+ {
+ return (short)(BB.f_init.q >> BB.f_zero.q);
+ }
+ private static short test_4_12(short num)
+ {
+ return AA.a_init[BB.f_init.q].q;
+ }
+ private static short test_4_13(short num)
+ {
+ return AA.aa_init[num - 100, (BB.f_init.q | 1) - 2, 1 + BB.f_zero.q].q;
+ }
+ private static short test_4_14(short num)
+ {
+ object bb = BB.f_init.q;
+ return (short)bb;
+ }
+ private static short test_4_15(short num)
+ {
+ double dbl = BB.f_init.q;
+ return (short)dbl;
+ }
+ private static short test_4_16(short num)
+ {
+ return AA.call_target(BB.f_init.q);
+ }
+ private static short test_4_17(short num)
+ {
+ return AA.call_target_ref(ref BB.f_init.q);
+ }
+ private static short test_5_0(short num)
+ {
+ return ((AA)AA.b_init).q;
+ }
+ private static short test_6_0(short num, TypedReference tr_init)
+ {
+ return __refvalue(tr_init, AA).q;
+ }
+ private static unsafe short test_7_0(short num, void* ptr_init, void* ptr_zero)
+ {
+ return (*((AA*)ptr_init)).q;
+ }
+ private static unsafe short test_7_1(short num, void* ptr_init, void* ptr_zero)
+ {
+ (*((AA*)ptr_zero)).q = num;
+ return (*((AA*)ptr_zero)).q;
+ }
+ private static unsafe short test_7_2(short num, void* ptr_init, void* ptr_zero)
+ {
+ return (short)((*((AA*)ptr_init)).q + (*((AA*)ptr_zero)).q);
+ }
+ private static unsafe short test_7_3(short num, void* ptr_init, void* ptr_zero)
+ {
+ return (short)checked((*((AA*)ptr_init)).q - (*((AA*)ptr_zero)).q);
+ }
+ private static unsafe short test_7_4(short num, void* ptr_init, void* ptr_zero)
+ {
+ (*((AA*)ptr_zero)).q += num; return (*((AA*)ptr_zero)).q;
+ }
+ private static unsafe short test_7_5(short num, void* ptr_init, void* ptr_zero)
+ {
+ (*((AA*)ptr_zero)).q += (*((AA*)ptr_init)).q; return (*((AA*)ptr_zero)).q;
+ }
+ private static unsafe short test_7_6(short num, void* ptr_init, void* ptr_zero)
+ {
+ if ((*((AA*)ptr_init)).q == num)
+ return 100;
+ else
+ return (*((AA*)ptr_zero)).q;
+ }
+ private static unsafe short test_7_7(short num, void* ptr_init, void* ptr_zero)
+ {
+ return (short)((*((AA*)ptr_init)).q < num + 1 ? 100 : -1);
+ }
+ private static unsafe short test_7_8(short num, void* ptr_init, void* ptr_zero)
+ {
+ return (short)(((*((AA*)ptr_init)).q > (*((AA*)ptr_zero)).q ? 1 : 0) + 99);
+ }
+ private static unsafe short test_7_9(short num, void* ptr_init, void* ptr_zero)
+ {
+ return (short)(((*((AA*)ptr_init)).q ^ (*((AA*)ptr_zero)).q) | num);
+ }
+ private static unsafe short test_7_10(short num, void* ptr_init, void* ptr_zero)
+ {
+ (*((AA*)ptr_zero)).q |= (*((AA*)ptr_init)).q;
+ return (short)((*((AA*)ptr_zero)).q & num);
+ }
+ private static unsafe short test_7_11(short num, void* ptr_init, void* ptr_zero)
+ {
+ return (short)((*((AA*)ptr_init)).q >> (*((AA*)ptr_zero)).q);
+ }
+ private static unsafe short test_7_12(short num, void* ptr_init, void* ptr_zero)
+ {
+ return AA.a_init[(*((AA*)ptr_init)).q].q;
+ }
+ private static unsafe short test_7_13(short num, void* ptr_init, void* ptr_zero)
+ {
+ return AA.aa_init[num - 100, ((*((AA*)ptr_init)).q | 1) - 2, 1 + (*((AA*)ptr_zero)).q].q;
+ }
+ private static unsafe short test_7_14(short num, void* ptr_init, void* ptr_zero)
+ {
+ object bb = (*((AA*)ptr_init)).q;
+ return (short)bb;
+ }
+ private static unsafe short test_7_15(short num, void* ptr_init, void* ptr_zero)
+ {
+ double dbl = (*((AA*)ptr_init)).q;
+ return (short)dbl;
+ }
+ private static unsafe short test_7_16(short num, void* ptr_init, void* ptr_zero)
+ {
+ return AA.call_target((*((AA*)ptr_init)).q);
+ }
+ private static unsafe short test_7_17(short num, void* ptr_init, void* ptr_zero)
+ {
+ return AA.call_target_ref(ref (*((AA*)ptr_init)).q);
+ }
+
+ private static unsafe int Main()
+ {
+ AA.reset();
+ if (test_0_0(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_0() failed.");
+ return 101;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_1(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_1() failed.");
+ return 102;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_2(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_2() failed.");
+ return 103;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_3(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_3() failed.");
+ return 104;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_4(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_4() failed.");
+ return 105;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_5(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_5() failed.");
+ return 106;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_6(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_6() failed.");
+ return 107;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_7(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_7() failed.");
+ return 108;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_8(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_8() failed.");
+ return 109;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_9(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_9() failed.");
+ return 110;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_10(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_10() failed.");
+ return 111;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_11(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_11() failed.");
+ return 112;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_12(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_12() failed.");
+ return 113;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_13(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_13() failed.");
+ return 114;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_14(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_14() failed.");
+ return 115;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_15(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_15() failed.");
+ return 116;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_16(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_16() failed.");
+ return 117;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_17(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_17() failed.");
+ return 118;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_0(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_0() failed.");
+ return 119;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_1(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_1() failed.");
+ return 120;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_2(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_2() failed.");
+ return 121;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_3(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_3() failed.");
+ return 122;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_4(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_4() failed.");
+ return 123;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_5(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_5() failed.");
+ return 124;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_6(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_6() failed.");
+ return 125;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_7(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_7() failed.");
+ return 126;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_8(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_8() failed.");
+ return 127;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_9(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_9() failed.");
+ return 128;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_10(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_10() failed.");
+ return 129;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_11(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_11() failed.");
+ return 130;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_12(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_12() failed.");
+ return 131;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_13(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_13() failed.");
+ return 132;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_14(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_14() failed.");
+ return 133;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_15(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_15() failed.");
+ return 134;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_16(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_16() failed.");
+ return 135;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_17(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_17() failed.");
+ return 136;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_0(100) != 100)
+ {
+ Console.WriteLine("test_2_0() failed.");
+ return 137;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_1(100) != 100)
+ {
+ Console.WriteLine("test_2_1() failed.");
+ return 138;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_2(100) != 100)
+ {
+ Console.WriteLine("test_2_2() failed.");
+ return 139;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_3(100) != 100)
+ {
+ Console.WriteLine("test_2_3() failed.");
+ return 140;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_4(100) != 100)
+ {
+ Console.WriteLine("test_2_4() failed.");
+ return 141;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_5(100) != 100)
+ {
+ Console.WriteLine("test_2_5() failed.");
+ return 142;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_6(100) != 100)
+ {
+ Console.WriteLine("test_2_6() failed.");
+ return 143;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_7(100) != 100)
+ {
+ Console.WriteLine("test_2_7() failed.");
+ return 144;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_8(100) != 100)
+ {
+ Console.WriteLine("test_2_8() failed.");
+ return 145;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_9(100) != 100)
+ {
+ Console.WriteLine("test_2_9() failed.");
+ return 146;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_10(100) != 100)
+ {
+ Console.WriteLine("test_2_10() failed.");
+ return 147;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_11(100) != 100)
+ {
+ Console.WriteLine("test_2_11() failed.");
+ return 148;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_12(100) != 100)
+ {
+ Console.WriteLine("test_2_12() failed.");
+ return 149;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_13(100) != 100)
+ {
+ Console.WriteLine("test_2_13() failed.");
+ return 150;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_14(100) != 100)
+ {
+ Console.WriteLine("test_2_14() failed.");
+ return 151;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_15(100) != 100)
+ {
+ Console.WriteLine("test_2_15() failed.");
+ return 152;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_16(100) != 100)
+ {
+ Console.WriteLine("test_2_16() failed.");
+ return 153;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_17(100) != 100)
+ {
+ Console.WriteLine("test_2_17() failed.");
+ return 154;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_0(100) != 100)
+ {
+ Console.WriteLine("test_3_0() failed.");
+ return 155;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_1(100) != 100)
+ {
+ Console.WriteLine("test_3_1() failed.");
+ return 156;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_2(100) != 100)
+ {
+ Console.WriteLine("test_3_2() failed.");
+ return 157;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_3(100) != 100)
+ {
+ Console.WriteLine("test_3_3() failed.");
+ return 158;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_4(100) != 100)
+ {
+ Console.WriteLine("test_3_4() failed.");
+ return 159;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_5(100) != 100)
+ {
+ Console.WriteLine("test_3_5() failed.");
+ return 160;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_6(100) != 100)
+ {
+ Console.WriteLine("test_3_6() failed.");
+ return 161;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_7(100) != 100)
+ {
+ Console.WriteLine("test_3_7() failed.");
+ return 162;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_8(100) != 100)
+ {
+ Console.WriteLine("test_3_8() failed.");
+ return 163;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_9(100) != 100)
+ {
+ Console.WriteLine("test_3_9() failed.");
+ return 164;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_10(100) != 100)
+ {
+ Console.WriteLine("test_3_10() failed.");
+ return 165;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_11(100) != 100)
+ {
+ Console.WriteLine("test_3_11() failed.");
+ return 166;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_12(100) != 100)
+ {
+ Console.WriteLine("test_3_12() failed.");
+ return 167;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_13(100) != 100)
+ {
+ Console.WriteLine("test_3_13() failed.");
+ return 168;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_14(100) != 100)
+ {
+ Console.WriteLine("test_3_14() failed.");
+ return 169;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_15(100) != 100)
+ {
+ Console.WriteLine("test_3_15() failed.");
+ return 170;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_16(100) != 100)
+ {
+ Console.WriteLine("test_3_16() failed.");
+ return 171;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_17(100) != 100)
+ {
+ Console.WriteLine("test_3_17() failed.");
+ return 172;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_0(100) != 100)
+ {
+ Console.WriteLine("test_4_0() failed.");
+ return 173;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_1(100) != 100)
+ {
+ Console.WriteLine("test_4_1() failed.");
+ return 174;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_2(100) != 100)
+ {
+ Console.WriteLine("test_4_2() failed.");
+ return 175;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_3(100) != 100)
+ {
+ Console.WriteLine("test_4_3() failed.");
+ return 176;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_4(100) != 100)
+ {
+ Console.WriteLine("test_4_4() failed.");
+ return 177;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_5(100) != 100)
+ {
+ Console.WriteLine("test_4_5() failed.");
+ return 178;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_6(100) != 100)
+ {
+ Console.WriteLine("test_4_6() failed.");
+ return 179;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_7(100) != 100)
+ {
+ Console.WriteLine("test_4_7() failed.");
+ return 180;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_8(100) != 100)
+ {
+ Console.WriteLine("test_4_8() failed.");
+ return 181;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_9(100) != 100)
+ {
+ Console.WriteLine("test_4_9() failed.");
+ return 182;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_10(100) != 100)
+ {
+ Console.WriteLine("test_4_10() failed.");
+ return 183;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_11(100) != 100)
+ {
+ Console.WriteLine("test_4_11() failed.");
+ return 184;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_12(100) != 100)
+ {
+ Console.WriteLine("test_4_12() failed.");
+ return 185;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_13(100) != 100)
+ {
+ Console.WriteLine("test_4_13() failed.");
+ return 186;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_14(100) != 100)
+ {
+ Console.WriteLine("test_4_14() failed.");
+ return 187;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_15(100) != 100)
+ {
+ Console.WriteLine("test_4_15() failed.");
+ return 188;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_16(100) != 100)
+ {
+ Console.WriteLine("test_4_16() failed.");
+ return 189;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_17(100) != 100)
+ {
+ Console.WriteLine("test_4_17() failed.");
+ return 190;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_5_0(100) != 100)
+ {
+ Console.WriteLine("test_5_0() failed.");
+ return 191;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_6_0(100, __makeref(AA._init)) != 100)
+ {
+ Console.WriteLine("test_6_0() failed.");
+ return 192;
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_0(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_0() failed.");
+ return 193;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_1(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_1() failed.");
+ return 194;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_2(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_2() failed.");
+ return 195;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_3(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_3() failed.");
+ return 196;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_4(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_4() failed.");
+ return 197;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_5(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_5() failed.");
+ return 198;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_6(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_6() failed.");
+ return 199;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_7(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_7() failed.");
+ return 200;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_8(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_8() failed.");
+ return 201;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_9(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_9() failed.");
+ return 202;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_10(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_10() failed.");
+ return 203;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_11(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_11() failed.");
+ return 204;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_12(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_12() failed.");
+ return 205;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_13(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_13() failed.");
+ return 206;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_14(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_14() failed.");
+ return 207;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_15(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_15() failed.");
+ return 208;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_16(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_16() failed.");
+ return 209;
+ }
+ }
+ AA.verify_all(); AA.reset();
+ fixed (void* p_init = &AA._init, p_zero = &AA._zero)
+ {
+ if (test_7_17(100, p_init, p_zero) != 100)
+ {
+ Console.WriteLine("test_7_17() failed.");
+ return 210;
+ }
+ }
+ AA.verify_all(); Console.WriteLine("All tests passed.");
+ return 100;
+ }
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/body_val.cs b/tests/src/JIT/Methodical/explicit/coverage/body_val.cs
new file mode 100644
index 0000000000..a2978f6f79
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/body_val.cs
@@ -0,0 +1,819 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+
+internal class TestApp
+{
+ private static int test_0_0(int num, AA init, AA zero)
+ {
+ return init.q.val;
+ }
+ private static int test_0_1(int num, AA init, AA zero)
+ {
+ zero.q.val = num;
+ return zero.q.val;
+ }
+ private static int test_0_2(int num, AA init, AA zero)
+ {
+ if (init.q.val != zero.q.val)
+ return 100;
+ else
+ return zero.q.val;
+ }
+ private static int test_0_3(int num, AA init, AA zero)
+ {
+ return init.q.val < num + 1 ? 100 : -1;
+ }
+ private static int test_0_4(int num, AA init, AA zero)
+ {
+ return (init.q.val > zero.q.val ? 1 : 0) + 99;
+ }
+ private static int test_0_5(int num, AA init, AA zero)
+ {
+ return (init.q.val ^ zero.q.val) | num;
+ }
+ private static int test_0_6(int num, AA init, AA zero)
+ {
+ zero.q.val |= init.q.val;
+ return zero.q.val & num;
+ }
+ private static int test_0_7(int num, AA init, AA zero)
+ {
+ return init.q.val >> zero.q.val;
+ }
+ private static int test_0_8(int num, AA init, AA zero)
+ {
+ return AA.a_init[init.q.val].q.val;
+ }
+ private static int test_0_9(int num, AA init, AA zero)
+ {
+ return AA.aa_init[num - 100, (init.q.val | 1) - 2, 1 + zero.q.val].q.val;
+ }
+ private static int test_0_10(int num, AA init, AA zero)
+ {
+ object bb = init.q.val;
+ return (int)bb;
+ }
+ private static int test_0_11(int num, AA init, AA zero)
+ {
+ double dbl = init.q.val;
+ return (int)dbl;
+ }
+ private static int test_0_12(int num, AA init, AA zero)
+ {
+ return AA.call_target(init.q).val;
+ }
+ private static int test_0_13(int num, AA init, AA zero)
+ {
+ return AA.call_target_ref(ref init.q).val;
+ }
+ private static int test_0_14(int num, AA init, AA zero)
+ {
+ return init.q.ret_code();
+ }
+ private static int test_1_0(int num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q.val;
+ }
+ private static int test_1_1(int num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q.val = num;
+ return r_zero.q.val;
+ }
+ private static int test_1_2(int num, ref AA r_init, ref AA r_zero)
+ {
+ if (r_init.q.val != r_zero.q.val)
+ return 100;
+ else
+ return r_zero.q.val;
+ }
+ private static int test_1_3(int num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q.val < num + 1 ? 100 : -1;
+ }
+ private static int test_1_4(int num, ref AA r_init, ref AA r_zero)
+ {
+ return (r_init.q.val > r_zero.q.val ? 1 : 0) + 99;
+ }
+ private static int test_1_5(int num, ref AA r_init, ref AA r_zero)
+ {
+ return (r_init.q.val ^ r_zero.q.val) | num;
+ }
+ private static int test_1_6(int num, ref AA r_init, ref AA r_zero)
+ {
+ r_zero.q.val |= r_init.q.val;
+ return r_zero.q.val & num;
+ }
+ private static int test_1_7(int num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q.val >> r_zero.q.val;
+ }
+ private static int test_1_8(int num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.a_init[r_init.q.val].q.val;
+ }
+ private static int test_1_9(int num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.aa_init[num - 100, (r_init.q.val | 1) - 2, 1 + r_zero.q.val].q.val;
+ }
+ private static int test_1_10(int num, ref AA r_init, ref AA r_zero)
+ {
+ object bb = r_init.q.val;
+ return (int)bb;
+ }
+ private static int test_1_11(int num, ref AA r_init, ref AA r_zero)
+ {
+ double dbl = r_init.q.val;
+ return (int)dbl;
+ }
+ private static int test_1_12(int num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.call_target(r_init.q).val;
+ }
+ private static int test_1_13(int num, ref AA r_init, ref AA r_zero)
+ {
+ return AA.call_target_ref(ref r_init.q).val;
+ }
+ private static int test_1_14(int num, ref AA r_init, ref AA r_zero)
+ {
+ return r_init.q.ret_code();
+ }
+ private static int test_2_0(int num)
+ {
+ return AA.a_init[num].q.val;
+ }
+ private static int test_2_1(int num)
+ {
+ AA.a_zero[num].q.val = num;
+ return AA.a_zero[num].q.val;
+ }
+ private static int test_2_2(int num)
+ {
+ if (AA.a_init[num].q.val != AA.a_zero[num].q.val)
+ return 100;
+ else
+ return AA.a_zero[num].q.val;
+ }
+ private static int test_2_3(int num)
+ {
+ return AA.a_init[num].q.val < num + 1 ? 100 : -1;
+ }
+ private static int test_2_4(int num)
+ {
+ return (AA.a_init[num].q.val > AA.a_zero[num].q.val ? 1 : 0) + 99;
+ }
+ private static int test_2_5(int num)
+ {
+ return (AA.a_init[num].q.val ^ AA.a_zero[num].q.val) | num;
+ }
+ private static int test_2_6(int num)
+ {
+ AA.a_zero[num].q.val |= AA.a_init[num].q.val;
+ return AA.a_zero[num].q.val & num;
+ }
+ private static int test_2_7(int num)
+ {
+ return AA.a_init[num].q.val >> AA.a_zero[num].q.val;
+ }
+ private static int test_2_8(int num)
+ {
+ return AA.a_init[AA.a_init[num].q.val].q.val;
+ }
+ private static int test_2_9(int num)
+ {
+ return AA.aa_init[num - 100, (AA.a_init[num].q.val | 1) - 2, 1 + AA.a_zero[num].q.val].q.val;
+ }
+ private static int test_2_10(int num)
+ {
+ object bb = AA.a_init[num].q.val;
+ return (int)bb;
+ }
+ private static int test_2_11(int num)
+ {
+ double dbl = AA.a_init[num].q.val;
+ return (int)dbl;
+ }
+ private static int test_2_12(int num)
+ {
+ return AA.call_target(AA.a_init[num].q).val;
+ }
+ private static int test_2_13(int num)
+ {
+ return AA.call_target_ref(ref AA.a_init[num].q).val;
+ }
+ private static int test_2_14(int num)
+ {
+ return AA.a_init[num].q.ret_code();
+ }
+ private static int test_3_0(int num)
+ {
+ return AA.aa_init[0, num - 1, num / 100].q.val;
+ }
+ private static int test_3_1(int num)
+ {
+ AA.aa_zero[0, num - 1, num / 100].q.val = num;
+ return AA.aa_zero[0, num - 1, num / 100].q.val;
+ }
+ private static int test_3_2(int num)
+ {
+ if (AA.aa_init[0, num - 1, num / 100].q.val != AA.aa_zero[0, num - 1, num / 100].q.val)
+ return 100;
+ else
+ return AA.aa_zero[0, num - 1, num / 100].q.val;
+ }
+ private static int test_3_3(int num)
+ {
+ return AA.aa_init[0, num - 1, num / 100].q.val < num + 1 ? 100 : -1;
+ }
+ private static int test_3_4(int num)
+ {
+ return (AA.aa_init[0, num - 1, num / 100].q.val > AA.aa_zero[0, num - 1, num / 100].q.val ? 1 : 0) + 99;
+ }
+ private static int test_3_5(int num)
+ {
+ return (AA.aa_init[0, num - 1, num / 100].q.val ^ AA.aa_zero[0, num - 1, num / 100].q.val) | num;
+ }
+ private static int test_3_6(int num)
+ {
+ AA.aa_zero[0, num - 1, num / 100].q.val |= AA.aa_init[0, num - 1, num / 100].q.val;
+ return AA.aa_zero[0, num - 1, num / 100].q.val & num;
+ }
+ private static int test_3_7(int num)
+ {
+ return AA.aa_init[0, num - 1, num / 100].q.val >> AA.aa_zero[0, num - 1, num / 100].q.val;
+ }
+ private static int test_3_8(int num)
+ {
+ return AA.a_init[AA.aa_init[0, num - 1, num / 100].q.val].q.val;
+ }
+ private static int test_3_9(int num)
+ {
+ return AA.aa_init[num - 100, (AA.aa_init[0, num - 1, num / 100].q.val | 1) - 2, 1 + AA.aa_zero[0, num - 1, num / 100].q.val].q.val;
+ }
+ private static int test_3_10(int num)
+ {
+ object bb = AA.aa_init[0, num - 1, num / 100].q.val;
+ return (int)bb;
+ }
+ private static int test_3_11(int num)
+ {
+ double dbl = AA.aa_init[0, num - 1, num / 100].q.val;
+ return (int)dbl;
+ }
+ private static int test_3_12(int num)
+ {
+ return AA.call_target(AA.aa_init[0, num - 1, num / 100].q).val;
+ }
+ private static int test_3_13(int num)
+ {
+ return AA.call_target_ref(ref AA.aa_init[0, num - 1, num / 100].q).val;
+ }
+ private static int test_3_14(int num)
+ {
+ return AA.aa_init[0, num - 1, num / 100].q.ret_code();
+ }
+ private static int test_4_0(int num)
+ {
+ return BB.f_init.q.val;
+ }
+ private static int test_4_1(int num)
+ {
+ BB.f_zero.q.val = num;
+ return BB.f_zero.q.val;
+ }
+ private static int test_4_2(int num)
+ {
+ if (BB.f_init.q.val != BB.f_zero.q.val)
+ return 100;
+ else
+ return BB.f_zero.q.val;
+ }
+ private static int test_4_3(int num)
+ {
+ return BB.f_init.q.val < num + 1 ? 100 : -1;
+ }
+ private static int test_4_4(int num)
+ {
+ return (BB.f_init.q.val > BB.f_zero.q.val ? 1 : 0) + 99;
+ }
+ private static int test_4_5(int num)
+ {
+ return (BB.f_init.q.val ^ BB.f_zero.q.val) | num;
+ }
+ private static int test_4_6(int num)
+ {
+ BB.f_zero.q.val |= BB.f_init.q.val;
+ return BB.f_zero.q.val & num;
+ }
+ private static int test_4_7(int num)
+ {
+ return BB.f_init.q.val >> BB.f_zero.q.val;
+ }
+ private static int test_4_8(int num)
+ {
+ return AA.a_init[BB.f_init.q.val].q.val;
+ }
+ private static int test_4_9(int num)
+ {
+ return AA.aa_init[num - 100, (BB.f_init.q.val | 1) - 2, 1 + BB.f_zero.q.val].q.val;
+ }
+ private static int test_4_10(int num)
+ {
+ object bb = BB.f_init.q.val;
+ return (int)bb;
+ }
+ private static int test_4_11(int num)
+ {
+ double dbl = BB.f_init.q.val;
+ return (int)dbl;
+ }
+ private static int test_4_12(int num)
+ {
+ return AA.call_target(BB.f_init.q).val;
+ }
+ private static int test_4_13(int num)
+ {
+ return AA.call_target_ref(ref BB.f_init.q).val;
+ }
+ private static int test_4_14(int num)
+ {
+ return BB.f_init.q.ret_code();
+ }
+ private static int test_5_0(int num)
+ {
+ return ((AA)AA.b_init).q.val;
+ }
+ private static int test_6_0(int num, TypedReference tr_init)
+ {
+ return __refvalue(tr_init, AA).q.val;
+ }
+
+ private static unsafe int Main()
+ {
+ AA.reset();
+ if (test_0_0(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_0() failed.");
+ return 101;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_1(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_1() failed.");
+ return 102;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_2(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_2() failed.");
+ return 103;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_3(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_3() failed.");
+ return 104;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_4(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_4() failed.");
+ return 105;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_5(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_5() failed.");
+ return 106;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_6(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_6() failed.");
+ return 107;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_7(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_7() failed.");
+ return 108;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_8(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_8() failed.");
+ return 109;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_9(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_9() failed.");
+ return 110;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_10(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_10() failed.");
+ return 111;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_11(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_11() failed.");
+ return 112;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_12(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_12() failed.");
+ return 113;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_13(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_13() failed.");
+ return 114;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_0_14(100, new AA(100), new AA(0)) != 100)
+ {
+ Console.WriteLine("test_0_14() failed.");
+ return 115;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_0(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_0() failed.");
+ return 116;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_1(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_1() failed.");
+ return 117;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_2(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_2() failed.");
+ return 118;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_3(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_3() failed.");
+ return 119;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_4(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_4() failed.");
+ return 120;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_5(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_5() failed.");
+ return 121;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_6(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_6() failed.");
+ return 122;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_7(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_7() failed.");
+ return 123;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_8(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_8() failed.");
+ return 124;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_9(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_9() failed.");
+ return 125;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_10(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_10() failed.");
+ return 126;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_11(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_11() failed.");
+ return 127;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_12(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_12() failed.");
+ return 128;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_13(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_13() failed.");
+ return 129;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_1_14(100, ref AA._init, ref AA._zero) != 100)
+ {
+ Console.WriteLine("test_1_14() failed.");
+ return 130;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_0(100) != 100)
+ {
+ Console.WriteLine("test_2_0() failed.");
+ return 131;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_1(100) != 100)
+ {
+ Console.WriteLine("test_2_1() failed.");
+ return 132;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_2(100) != 100)
+ {
+ Console.WriteLine("test_2_2() failed.");
+ return 133;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_3(100) != 100)
+ {
+ Console.WriteLine("test_2_3() failed.");
+ return 134;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_4(100) != 100)
+ {
+ Console.WriteLine("test_2_4() failed.");
+ return 135;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_5(100) != 100)
+ {
+ Console.WriteLine("test_2_5() failed.");
+ return 136;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_6(100) != 100)
+ {
+ Console.WriteLine("test_2_6() failed.");
+ return 137;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_7(100) != 100)
+ {
+ Console.WriteLine("test_2_7() failed.");
+ return 138;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_8(100) != 100)
+ {
+ Console.WriteLine("test_2_8() failed.");
+ return 139;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_9(100) != 100)
+ {
+ Console.WriteLine("test_2_9() failed.");
+ return 140;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_10(100) != 100)
+ {
+ Console.WriteLine("test_2_10() failed.");
+ return 141;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_11(100) != 100)
+ {
+ Console.WriteLine("test_2_11() failed.");
+ return 142;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_12(100) != 100)
+ {
+ Console.WriteLine("test_2_12() failed.");
+ return 143;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_13(100) != 100)
+ {
+ Console.WriteLine("test_2_13() failed.");
+ return 144;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_2_14(100) != 100)
+ {
+ Console.WriteLine("test_2_14() failed.");
+ return 145;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_0(100) != 100)
+ {
+ Console.WriteLine("test_3_0() failed.");
+ return 146;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_1(100) != 100)
+ {
+ Console.WriteLine("test_3_1() failed.");
+ return 147;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_2(100) != 100)
+ {
+ Console.WriteLine("test_3_2() failed.");
+ return 148;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_3(100) != 100)
+ {
+ Console.WriteLine("test_3_3() failed.");
+ return 149;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_4(100) != 100)
+ {
+ Console.WriteLine("test_3_4() failed.");
+ return 150;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_5(100) != 100)
+ {
+ Console.WriteLine("test_3_5() failed.");
+ return 151;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_6(100) != 100)
+ {
+ Console.WriteLine("test_3_6() failed.");
+ return 152;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_7(100) != 100)
+ {
+ Console.WriteLine("test_3_7() failed.");
+ return 153;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_8(100) != 100)
+ {
+ Console.WriteLine("test_3_8() failed.");
+ return 154;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_9(100) != 100)
+ {
+ Console.WriteLine("test_3_9() failed.");
+ return 155;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_10(100) != 100)
+ {
+ Console.WriteLine("test_3_10() failed.");
+ return 156;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_11(100) != 100)
+ {
+ Console.WriteLine("test_3_11() failed.");
+ return 157;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_12(100) != 100)
+ {
+ Console.WriteLine("test_3_12() failed.");
+ return 158;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_13(100) != 100)
+ {
+ Console.WriteLine("test_3_13() failed.");
+ return 159;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_3_14(100) != 100)
+ {
+ Console.WriteLine("test_3_14() failed.");
+ return 160;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_0(100) != 100)
+ {
+ Console.WriteLine("test_4_0() failed.");
+ return 161;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_1(100) != 100)
+ {
+ Console.WriteLine("test_4_1() failed.");
+ return 162;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_2(100) != 100)
+ {
+ Console.WriteLine("test_4_2() failed.");
+ return 163;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_3(100) != 100)
+ {
+ Console.WriteLine("test_4_3() failed.");
+ return 164;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_4(100) != 100)
+ {
+ Console.WriteLine("test_4_4() failed.");
+ return 165;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_5(100) != 100)
+ {
+ Console.WriteLine("test_4_5() failed.");
+ return 166;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_6(100) != 100)
+ {
+ Console.WriteLine("test_4_6() failed.");
+ return 167;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_7(100) != 100)
+ {
+ Console.WriteLine("test_4_7() failed.");
+ return 168;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_8(100) != 100)
+ {
+ Console.WriteLine("test_4_8() failed.");
+ return 169;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_9(100) != 100)
+ {
+ Console.WriteLine("test_4_9() failed.");
+ return 170;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_10(100) != 100)
+ {
+ Console.WriteLine("test_4_10() failed.");
+ return 171;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_11(100) != 100)
+ {
+ Console.WriteLine("test_4_11() failed.");
+ return 172;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_12(100) != 100)
+ {
+ Console.WriteLine("test_4_12() failed.");
+ return 173;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_13(100) != 100)
+ {
+ Console.WriteLine("test_4_13() failed.");
+ return 174;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_4_14(100) != 100)
+ {
+ Console.WriteLine("test_4_14() failed.");
+ return 175;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_5_0(100) != 100)
+ {
+ Console.WriteLine("test_5_0() failed.");
+ return 176;
+ }
+ AA.verify_all(); AA.reset();
+ if (test_6_0(100, __makeref(AA._init)) != 100)
+ {
+ Console.WriteLine("test_6_0() failed.");
+ return 177;
+ }
+ AA.verify_all(); Console.WriteLine("All tests passed.");
+ return 100;
+ }
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_byte_1.cs b/tests/src/JIT/Methodical/explicit/coverage/expl_byte_1.cs
new file mode 100644
index 0000000000..ef35831dae
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_byte_1.cs
@@ -0,0 +1,77 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+using System.Runtime.InteropServices;
+
+[StructLayout(LayoutKind.Explicit)]
+internal struct AA
+{
+ [FieldOffset(12)]
+ public ulong tmp1;
+ [FieldOffset(5)]
+ public sbyte tmp2;
+ [FieldOffset(0)]
+ public byte tmp3;
+
+ [FieldOffset(8)]
+ public byte q; //this field is the testing subject
+
+ [FieldOffset(40)]
+ public uint tmp4;
+ [FieldOffset(38)]
+ public byte tmp5;
+
+ public AA(byte qq)
+ {
+ tmp1 = 0;
+ tmp2 = 0;
+ tmp3 = 0;
+ tmp4 = 0;
+ tmp5 = 0;
+ q = qq;
+ }
+
+ public static AA[] a_init = new AA[101];
+ public static AA[] a_zero = new AA[101];
+ public static AA[,,] aa_init = new AA[1, 101, 2];
+ public static AA[,,] aa_zero = new AA[1, 101, 2];
+ public static object b_init = new AA(100);
+ public static AA _init, _zero;
+
+ public static byte call_target(byte arg) { return arg; }
+ public static byte call_target_ref(ref byte arg) { return arg; }
+
+ public void verify()
+ {
+ }
+
+ public static void verify_all()
+ {
+ a_init[100].verify();
+ a_zero[100].verify();
+ aa_init[0, 99, 1].verify();
+ aa_zero[0, 99, 1].verify();
+ _init.verify();
+ _zero.verify();
+ BB.f_init.verify();
+ BB.f_zero.verify();
+ }
+
+ public static void reset()
+ {
+ a_init[100] = new AA(100);
+ a_zero[100] = new AA(0);
+ aa_init[0, 99, 1] = new AA(100);
+ aa_zero[0, 99, 1] = new AA(0);
+ _init = new AA(100);
+ _zero = new AA(0);
+ BB.f_init = new AA(100);
+ BB.f_zero = new AA(0);
+ }
+}
+
+internal struct BB
+{
+ public static AA f_init, f_zero;
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_byte_1_d.csproj b/tests/src/JIT/Methodical/explicit/coverage/expl_byte_1_d.csproj
new file mode 100644
index 0000000000..670ef952cb
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_byte_1_d.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="expl_byte_1.cs" />
+ <Compile Include="body_byte.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_byte_1_r.csproj b/tests/src/JIT/Methodical/explicit/coverage/expl_byte_1_r.csproj
new file mode 100644
index 0000000000..670ef952cb
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_byte_1_r.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="expl_byte_1.cs" />
+ <Compile Include="body_byte.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_double_1.cs b/tests/src/JIT/Methodical/explicit/coverage/expl_double_1.cs
new file mode 100644
index 0000000000..ad6476483e
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_double_1.cs
@@ -0,0 +1,68 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+using System.Runtime.InteropServices;
+
+[StructLayout(LayoutKind.Explicit)]
+internal struct AA
+{
+ [FieldOffset(4)]
+ public byte tmp1;
+
+ [FieldOffset(8)]
+ public double q;
+
+ [FieldOffset(49)]
+ public short tmp2;
+
+ public AA(double qq)
+ {
+ tmp1 = 0;
+ tmp2 = 0;
+ q = qq;
+ }
+
+ public static AA[] a_init = new AA[101];
+ public static AA[] a_zero = new AA[101];
+ public static AA[,,] aa_init = new AA[1, 101, 2];
+ public static AA[,,] aa_zero = new AA[1, 101, 2];
+ public static object b_init = new AA(100);
+ public static AA _init, _zero;
+
+ public static double call_target(double arg) { return arg; }
+ public static double call_target_ref(ref double arg) { return arg; }
+
+ public void verify()
+ {
+ }
+
+ public static void verify_all()
+ {
+ a_init[100].verify();
+ a_zero[100].verify();
+ aa_init[0, 99, 1].verify();
+ aa_zero[0, 99, 1].verify();
+ _init.verify();
+ _zero.verify();
+ BB.f_init.verify();
+ BB.f_zero.verify();
+ }
+
+ public static void reset()
+ {
+ a_init[100] = new AA(100);
+ a_zero[100] = new AA(0);
+ aa_init[0, 99, 1] = new AA(100);
+ aa_zero[0, 99, 1] = new AA(0);
+ _init = new AA(100);
+ _zero = new AA(0);
+ BB.f_init = new AA(100);
+ BB.f_zero = new AA(0);
+ }
+}
+
+internal struct BB
+{
+ public static AA f_init, f_zero;
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_double_1_d.csproj b/tests/src/JIT/Methodical/explicit/coverage/expl_double_1_d.csproj
new file mode 100644
index 0000000000..8c7cfd200e
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_double_1_d.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="expl_double_1.cs" />
+ <Compile Include="body_double.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_double_1_r.csproj b/tests/src/JIT/Methodical/explicit/coverage/expl_double_1_r.csproj
new file mode 100644
index 0000000000..8c7cfd200e
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_double_1_r.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="expl_double_1.cs" />
+ <Compile Include="body_double.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_float_1.cs b/tests/src/JIT/Methodical/explicit/coverage/expl_float_1.cs
new file mode 100644
index 0000000000..238feb605b
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_float_1.cs
@@ -0,0 +1,68 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+using System.Runtime.InteropServices;
+
+[StructLayout(LayoutKind.Explicit)]
+internal struct AA
+{
+ [FieldOffset(3)]
+ public byte tmp1;
+
+ [FieldOffset(8)]
+ public float q;
+
+ [FieldOffset(47)]
+ public float tmp2;
+
+ public AA(float qq)
+ {
+ tmp1 = 0;
+ tmp2 = 0;
+ q = qq;
+ }
+
+ public static AA[] a_init = new AA[101];
+ public static AA[] a_zero = new AA[101];
+ public static AA[,,] aa_init = new AA[1, 101, 2];
+ public static AA[,,] aa_zero = new AA[1, 101, 2];
+ public static object b_init = new AA(100);
+ public static AA _init, _zero;
+
+ public static float call_target(float arg) { return arg; }
+ public static float call_target_ref(ref float arg) { return arg; }
+
+ public void verify()
+ {
+ }
+
+ public static void verify_all()
+ {
+ a_init[100].verify();
+ a_zero[100].verify();
+ aa_init[0, 99, 1].verify();
+ aa_zero[0, 99, 1].verify();
+ _init.verify();
+ _zero.verify();
+ BB.f_init.verify();
+ BB.f_zero.verify();
+ }
+
+ public static void reset()
+ {
+ a_init[100] = new AA(100);
+ a_zero[100] = new AA(0);
+ aa_init[0, 99, 1] = new AA(100);
+ aa_zero[0, 99, 1] = new AA(0);
+ _init = new AA(100);
+ _zero = new AA(0);
+ BB.f_init = new AA(100);
+ BB.f_zero = new AA(0);
+ }
+}
+
+internal struct BB
+{
+ public static AA f_init, f_zero;
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_float_1_d.csproj b/tests/src/JIT/Methodical/explicit/coverage/expl_float_1_d.csproj
new file mode 100644
index 0000000000..8668775b9e
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_float_1_d.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="expl_float_1.cs" />
+ <Compile Include="body_float.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_float_1_r.csproj b/tests/src/JIT/Methodical/explicit/coverage/expl_float_1_r.csproj
new file mode 100644
index 0000000000..8668775b9e
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_float_1_r.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="expl_float_1.cs" />
+ <Compile Include="body_float.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_gc_byte_1.cs b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_byte_1.cs
new file mode 100644
index 0000000000..d2289976a9
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_byte_1.cs
@@ -0,0 +1,71 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+using System.Runtime.InteropServices;
+
+[StructLayout(LayoutKind.Explicit)]
+internal class AA
+{
+ [FieldOffset(7)]
+ public short tmp1;
+
+ [FieldOffset(8)]
+ public byte q; //this field is the testing subject
+
+ [FieldOffset(37)]
+ public int tmp2;
+ [FieldOffset(44)]
+ public int tmp3;
+
+ public AA(byte qq)
+ {
+ tmp1 = 0;
+ tmp2 = 0;
+ tmp3 = 0;
+ q = qq;
+ }
+
+ public static AA[] a_init = new AA[101];
+ public static AA[] a_zero = new AA[101];
+ public static AA[,,] aa_init = new AA[1, 101, 2];
+ public static AA[,,] aa_zero = new AA[1, 101, 2];
+ public static object b_init = new AA(100);
+ public static AA _init, _zero;
+
+ public static byte call_target(byte arg) { return arg; }
+ public static byte call_target_ref(ref byte arg) { return arg; }
+
+ public void verify()
+ {
+ }
+
+ public static void verify_all()
+ {
+ a_init[100].verify();
+ a_zero[100].verify();
+ aa_init[0, 99, 1].verify();
+ aa_zero[0, 99, 1].verify();
+ _init.verify();
+ _zero.verify();
+ BB.f_init.verify();
+ BB.f_zero.verify();
+ }
+
+ public static void reset()
+ {
+ a_init[100] = new AA(100);
+ a_zero[100] = new AA(0);
+ aa_init[0, 99, 1] = new AA(100);
+ aa_zero[0, 99, 1] = new AA(0);
+ _init = new AA(100);
+ _zero = new AA(0);
+ BB.f_init = new AA(100);
+ BB.f_zero = new AA(0);
+ }
+}
+
+internal struct BB
+{
+ public static AA f_init, f_zero;
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_gc_byte_1_d.csproj b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_byte_1_d.csproj
new file mode 100644
index 0000000000..ee380380fc
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_byte_1_d.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="expl_gc_byte_1.cs" />
+ <Compile Include="body_safe_byte.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_gc_byte_1_r.csproj b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_byte_1_r.csproj
new file mode 100644
index 0000000000..ee380380fc
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_byte_1_r.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="expl_gc_byte_1.cs" />
+ <Compile Include="body_safe_byte.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_gc_double_1.cs b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_double_1.cs
new file mode 100644
index 0000000000..d86424385a
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_double_1.cs
@@ -0,0 +1,77 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+using System.Runtime.InteropServices;
+
+[StructLayout(LayoutKind.Explicit)]
+internal class AA
+{
+ [FieldOffset(9)]
+ public ulong tmp1;
+ [FieldOffset(1)]
+ public sbyte tmp2;
+ [FieldOffset(13)]
+ public ushort tmp3;
+
+ [FieldOffset(8)]
+ public double q;
+
+ [FieldOffset(48)]
+ public int tmp4;
+ [FieldOffset(41)]
+ public float tmp5;
+
+ public AA(double qq)
+ {
+ tmp1 = 0;
+ tmp2 = 0;
+ tmp3 = 0;
+ tmp4 = 0;
+ tmp5 = 0;
+ q = qq;
+ }
+
+ public static AA[] a_init = new AA[101];
+ public static AA[] a_zero = new AA[101];
+ public static AA[,,] aa_init = new AA[1, 101, 2];
+ public static AA[,,] aa_zero = new AA[1, 101, 2];
+ public static object b_init = new AA(100);
+ public static AA _init, _zero;
+
+ public static double call_target(double arg) { return arg; }
+ public static double call_target_ref(ref double arg) { return arg; }
+
+ public void verify()
+ {
+ }
+
+ public static void verify_all()
+ {
+ a_init[100].verify();
+ a_zero[100].verify();
+ aa_init[0, 99, 1].verify();
+ aa_zero[0, 99, 1].verify();
+ _init.verify();
+ _zero.verify();
+ BB.f_init.verify();
+ BB.f_zero.verify();
+ }
+
+ public static void reset()
+ {
+ a_init[100] = new AA(100);
+ a_zero[100] = new AA(0);
+ aa_init[0, 99, 1] = new AA(100);
+ aa_zero[0, 99, 1] = new AA(0);
+ _init = new AA(100);
+ _zero = new AA(0);
+ BB.f_init = new AA(100);
+ BB.f_zero = new AA(0);
+ }
+}
+
+internal struct BB
+{
+ public static AA f_init, f_zero;
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_gc_double_1_d.csproj b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_double_1_d.csproj
new file mode 100644
index 0000000000..be14580eb5
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_double_1_d.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="expl_gc_double_1.cs" />
+ <Compile Include="body_safe_double.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_gc_double_1_r.csproj b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_double_1_r.csproj
new file mode 100644
index 0000000000..be14580eb5
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_double_1_r.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="expl_gc_double_1.cs" />
+ <Compile Include="body_safe_double.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_gc_float_1.cs b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_float_1.cs
new file mode 100644
index 0000000000..07a226e174
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_float_1.cs
@@ -0,0 +1,80 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+using System.Runtime.InteropServices;
+
+[StructLayout(LayoutKind.Explicit)]
+internal class AA
+{
+ [FieldOffset(13)]
+ public long tmp1;
+ [FieldOffset(7)]
+ public long tmp2;
+ [FieldOffset(7)]
+ public long tmp3;
+
+ [FieldOffset(8)]
+ public float q;
+
+ [FieldOffset(36)]
+ public int tmp4;
+ [FieldOffset(44)]
+ public long tmp5;
+ [FieldOffset(39)]
+ public uint tmp6;
+
+ public AA(float qq)
+ {
+ tmp1 = 0;
+ tmp2 = 0;
+ tmp3 = 0;
+ tmp4 = 0;
+ tmp5 = 0;
+ tmp6 = 0;
+ q = qq;
+ }
+
+ public static AA[] a_init = new AA[101];
+ public static AA[] a_zero = new AA[101];
+ public static AA[,,] aa_init = new AA[1, 101, 2];
+ public static AA[,,] aa_zero = new AA[1, 101, 2];
+ public static object b_init = new AA(100);
+ public static AA _init, _zero;
+
+ public static float call_target(float arg) { return arg; }
+ public static float call_target_ref(ref float arg) { return arg; }
+
+ public void verify()
+ {
+ }
+
+ public static void verify_all()
+ {
+ a_init[100].verify();
+ a_zero[100].verify();
+ aa_init[0, 99, 1].verify();
+ aa_zero[0, 99, 1].verify();
+ _init.verify();
+ _zero.verify();
+ BB.f_init.verify();
+ BB.f_zero.verify();
+ }
+
+ public static void reset()
+ {
+ a_init[100] = new AA(100);
+ a_zero[100] = new AA(0);
+ aa_init[0, 99, 1] = new AA(100);
+ aa_zero[0, 99, 1] = new AA(0);
+ _init = new AA(100);
+ _zero = new AA(0);
+ BB.f_init = new AA(100);
+ BB.f_zero = new AA(0);
+ }
+}
+
+internal struct BB
+{
+ public static AA f_init, f_zero;
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_gc_float_1_d.csproj b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_float_1_d.csproj
new file mode 100644
index 0000000000..89f36e0f15
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_float_1_d.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="expl_gc_float_1.cs" />
+ <Compile Include="body_safe_float.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_gc_float_1_r.csproj b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_float_1_r.csproj
new file mode 100644
index 0000000000..89f36e0f15
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_float_1_r.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="expl_gc_float_1.cs" />
+ <Compile Include="body_safe_float.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_gc_int_1.cs b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_int_1.cs
new file mode 100644
index 0000000000..3cee01e03f
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_int_1.cs
@@ -0,0 +1,71 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+using System.Runtime.InteropServices;
+
+[StructLayout(LayoutKind.Explicit)]
+internal class AA
+{
+ [FieldOffset(7)]
+ public short tmp1;
+
+ [FieldOffset(8)]
+ public int q;
+
+ [FieldOffset(37)]
+ public int tmp2;
+ [FieldOffset(44)]
+ public int tmp3;
+
+ public AA(int qq)
+ {
+ tmp1 = 0;
+ tmp2 = 0;
+ tmp3 = 0;
+ q = qq;
+ }
+
+ public static AA[] a_init = new AA[101];
+ public static AA[] a_zero = new AA[101];
+ public static AA[,,] aa_init = new AA[1, 101, 2];
+ public static AA[,,] aa_zero = new AA[1, 101, 2];
+ public static object b_init = new AA(100);
+ public static AA _init, _zero;
+
+ public static int call_target(int arg) { return arg; }
+ public static int call_target_ref(ref int arg) { return arg; }
+
+ public void verify()
+ {
+ }
+
+ public static void verify_all()
+ {
+ a_init[100].verify();
+ a_zero[100].verify();
+ aa_init[0, 99, 1].verify();
+ aa_zero[0, 99, 1].verify();
+ _init.verify();
+ _zero.verify();
+ BB.f_init.verify();
+ BB.f_zero.verify();
+ }
+
+ public static void reset()
+ {
+ a_init[100] = new AA(100);
+ a_zero[100] = new AA(0);
+ aa_init[0, 99, 1] = new AA(100);
+ aa_zero[0, 99, 1] = new AA(0);
+ _init = new AA(100);
+ _zero = new AA(0);
+ BB.f_init = new AA(100);
+ BB.f_zero = new AA(0);
+ }
+}
+
+internal struct BB
+{
+ public static AA f_init, f_zero;
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_gc_int_1_d.csproj b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_int_1_d.csproj
new file mode 100644
index 0000000000..ad5cc6f383
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_int_1_d.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="expl_gc_int_1.cs" />
+ <Compile Include="body_safe_int.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_gc_int_1_r.csproj b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_int_1_r.csproj
new file mode 100644
index 0000000000..ad5cc6f383
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_int_1_r.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="expl_gc_int_1.cs" />
+ <Compile Include="body_safe_int.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_gc_long_1.cs b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_long_1.cs
new file mode 100644
index 0000000000..18269a22db
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_long_1.cs
@@ -0,0 +1,68 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+using System.Runtime.InteropServices;
+
+[StructLayout(LayoutKind.Explicit)]
+internal class AA
+{
+ [FieldOffset(3)]
+ public byte tmp1;
+
+ [FieldOffset(8)]
+ public long q;
+
+ [FieldOffset(47)]
+ public float tmp2;
+
+ public AA(long qq)
+ {
+ tmp1 = 0;
+ tmp2 = 0;
+ q = qq;
+ }
+
+ public static AA[] a_init = new AA[101];
+ public static AA[] a_zero = new AA[101];
+ public static AA[,,] aa_init = new AA[1, 101, 2];
+ public static AA[,,] aa_zero = new AA[1, 101, 2];
+ public static object b_init = new AA(100);
+ public static AA _init, _zero;
+
+ public static long call_target(long arg) { return arg; }
+ public static long call_target_ref(ref long arg) { return arg; }
+
+ public void verify()
+ {
+ }
+
+ public static void verify_all()
+ {
+ a_init[100].verify();
+ a_zero[100].verify();
+ aa_init[0, 99, 1].verify();
+ aa_zero[0, 99, 1].verify();
+ _init.verify();
+ _zero.verify();
+ BB.f_init.verify();
+ BB.f_zero.verify();
+ }
+
+ public static void reset()
+ {
+ a_init[100] = new AA(100);
+ a_zero[100] = new AA(0);
+ aa_init[0, 99, 1] = new AA(100);
+ aa_zero[0, 99, 1] = new AA(0);
+ _init = new AA(100);
+ _zero = new AA(0);
+ BB.f_init = new AA(100);
+ BB.f_zero = new AA(0);
+ }
+}
+
+internal struct BB
+{
+ public static AA f_init, f_zero;
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_gc_long_1_d.csproj b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_long_1_d.csproj
new file mode 100644
index 0000000000..ee52994fa1
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_long_1_d.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="expl_gc_long_1.cs" />
+ <Compile Include="body_safe_long.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_gc_long_1_r.csproj b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_long_1_r.csproj
new file mode 100644
index 0000000000..ee52994fa1
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_long_1_r.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="expl_gc_long_1.cs" />
+ <Compile Include="body_safe_long.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_gc_obj_1.cs b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_obj_1.cs
new file mode 100644
index 0000000000..dec4d6e046
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_obj_1.cs
@@ -0,0 +1,75 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+using System.Runtime.InteropServices;
+
+internal class QQ
+{
+ public int val;
+ public QQ(int vv) { val = vv; }
+ public int ret_code() { return 100; }
+};
+
+[StructLayout(LayoutKind.Explicit)]
+internal class AA
+{
+ [FieldOffset(4)]
+ public byte tmp1;
+
+ [FieldOffset(8)]
+ public QQ q; //this field is the testing subject
+
+ [FieldOffset(49)]
+ public short tmp2;
+
+ public AA(int qq)
+ {
+ tmp1 = 0;
+ tmp2 = 0;
+ q = new QQ(qq);
+ }
+
+ public static AA[] a_init = new AA[101];
+ public static AA[] a_zero = new AA[101];
+ public static AA[,,] aa_init = new AA[1, 101, 2];
+ public static AA[,,] aa_zero = new AA[1, 101, 2];
+ public static object b_init = new AA(100);
+ public static AA _init, _zero;
+
+ public static QQ call_target(QQ arg) { return arg; }
+ public static QQ call_target_ref(ref QQ arg) { return arg; }
+
+ public void verify()
+ {
+ }
+
+ public static void verify_all()
+ {
+ a_init[100].verify();
+ a_zero[100].verify();
+ aa_init[0, 99, 1].verify();
+ aa_zero[0, 99, 1].verify();
+ _init.verify();
+ _zero.verify();
+ BB.f_init.verify();
+ BB.f_zero.verify();
+ }
+
+ public static void reset()
+ {
+ a_init[100] = new AA(100);
+ a_zero[100] = new AA(0);
+ aa_init[0, 99, 1] = new AA(100);
+ aa_zero[0, 99, 1] = new AA(0);
+ _init = new AA(100);
+ _zero = new AA(0);
+ BB.f_init = new AA(100);
+ BB.f_zero = new AA(0);
+ }
+}
+
+internal struct BB
+{
+ public static AA f_init, f_zero;
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_gc_obj_1_d.csproj b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_obj_1_d.csproj
new file mode 100644
index 0000000000..7c5928a23e
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_obj_1_d.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="expl_gc_obj_1.cs" />
+ <Compile Include="body_safe_obj.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_gc_obj_1_r.csproj b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_obj_1_r.csproj
new file mode 100644
index 0000000000..7c5928a23e
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_obj_1_r.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="expl_gc_obj_1.cs" />
+ <Compile Include="body_safe_obj.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_gc_short_1.cs b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_short_1.cs
new file mode 100644
index 0000000000..9ec281a7ab
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_short_1.cs
@@ -0,0 +1,77 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+using System.Runtime.InteropServices;
+
+[StructLayout(LayoutKind.Explicit)]
+internal class AA
+{
+ [FieldOffset(12)]
+ public ulong tmp1;
+ [FieldOffset(5)]
+ public sbyte tmp2;
+ [FieldOffset(0)]
+ public byte tmp3;
+
+ [FieldOffset(8)]
+ public short q; //this field is the testing subject
+
+ [FieldOffset(40)]
+ public uint tmp4;
+ [FieldOffset(38)]
+ public byte tmp5;
+
+ public AA(short qq)
+ {
+ tmp1 = 0;
+ tmp2 = 0;
+ tmp3 = 0;
+ tmp4 = 0;
+ tmp5 = 0;
+ q = qq;
+ }
+
+ public static AA[] a_init = new AA[101];
+ public static AA[] a_zero = new AA[101];
+ public static AA[,,] aa_init = new AA[1, 101, 2];
+ public static AA[,,] aa_zero = new AA[1, 101, 2];
+ public static object b_init = new AA(100);
+ public static AA _init, _zero;
+
+ public static short call_target(short arg) { return arg; }
+ public static short call_target_ref(ref short arg) { return arg; }
+
+ public void verify()
+ {
+ }
+
+ public static void verify_all()
+ {
+ a_init[100].verify();
+ a_zero[100].verify();
+ aa_init[0, 99, 1].verify();
+ aa_zero[0, 99, 1].verify();
+ _init.verify();
+ _zero.verify();
+ BB.f_init.verify();
+ BB.f_zero.verify();
+ }
+
+ public static void reset()
+ {
+ a_init[100] = new AA(100);
+ a_zero[100] = new AA(0);
+ aa_init[0, 99, 1] = new AA(100);
+ aa_zero[0, 99, 1] = new AA(0);
+ _init = new AA(100);
+ _zero = new AA(0);
+ BB.f_init = new AA(100);
+ BB.f_zero = new AA(0);
+ }
+}
+
+internal struct BB
+{
+ public static AA f_init, f_zero;
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_gc_short_1_d.csproj b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_short_1_d.csproj
new file mode 100644
index 0000000000..8a16e48805
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_short_1_d.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="expl_gc_short_1.cs" />
+ <Compile Include="body_safe_short.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_gc_short_1_r.csproj b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_short_1_r.csproj
new file mode 100644
index 0000000000..8a16e48805
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_short_1_r.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="expl_gc_short_1.cs" />
+ <Compile Include="body_safe_short.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_gc_val_1.cs b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_val_1.cs
new file mode 100644
index 0000000000..c1f762b251
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_val_1.cs
@@ -0,0 +1,84 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+using System.Runtime.InteropServices;
+
+internal struct QQ
+{
+ public int val;
+ public QQ(int vv) { val = vv; }
+ public int ret_code() { return 100; }
+};
+
+[StructLayout(LayoutKind.Explicit)]
+internal class AA
+{
+ [FieldOffset(0)]
+ public sbyte tmp1;
+ [FieldOffset(7)]
+ public double tmp2;
+
+ [FieldOffset(8)]
+ public QQ q; //this field is the testing subject
+
+ [FieldOffset(48)]
+ public double tmp3;
+ [FieldOffset(36)]
+ public float tmp4;
+ [FieldOffset(51)]
+ public long tmp5;
+
+ public AA(int qq)
+ {
+ tmp1 = 0;
+ tmp2 = 0;
+ tmp3 = 0;
+ tmp4 = 0;
+ tmp5 = 0;
+ q = new QQ(qq);
+ }
+
+ public static AA[] a_init = new AA[101];
+ public static AA[] a_zero = new AA[101];
+ public static AA[,,] aa_init = new AA[1, 101, 2];
+ public static AA[,,] aa_zero = new AA[1, 101, 2];
+ public static object b_init = new AA(100);
+ public static AA _init, _zero;
+
+ public static QQ call_target(QQ arg) { return arg; }
+ public static QQ call_target_ref(ref QQ arg) { return arg; }
+
+ public void verify()
+ {
+ }
+
+ public static void verify_all()
+ {
+ a_init[100].verify();
+ a_zero[100].verify();
+ aa_init[0, 99, 1].verify();
+ aa_zero[0, 99, 1].verify();
+ _init.verify();
+ _zero.verify();
+ BB.f_init.verify();
+ BB.f_zero.verify();
+ }
+
+ public static void reset()
+ {
+ a_init[100] = new AA(100);
+ a_zero[100] = new AA(0);
+ aa_init[0, 99, 1] = new AA(100);
+ aa_zero[0, 99, 1] = new AA(0);
+ _init = new AA(100);
+ _zero = new AA(0);
+ BB.f_init = new AA(100);
+ BB.f_zero = new AA(0);
+ }
+}
+
+internal struct BB
+{
+ public static AA f_init, f_zero;
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_gc_val_1_d.csproj b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_val_1_d.csproj
new file mode 100644
index 0000000000..f186772736
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_val_1_d.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="expl_gc_val_1.cs" />
+ <Compile Include="body_safe_val.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_gc_val_1_r.csproj b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_val_1_r.csproj
new file mode 100644
index 0000000000..f186772736
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_gc_val_1_r.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="expl_gc_val_1.cs" />
+ <Compile Include="body_safe_val.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_int_1.cs b/tests/src/JIT/Methodical/explicit/coverage/expl_int_1.cs
new file mode 100644
index 0000000000..c904656760
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_int_1.cs
@@ -0,0 +1,77 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+using System.Runtime.InteropServices;
+
+[StructLayout(LayoutKind.Explicit)]
+internal struct AA
+{
+ [FieldOffset(12)]
+ public ulong tmp1;
+ [FieldOffset(5)]
+ public sbyte tmp2;
+ [FieldOffset(0)]
+ public byte tmp3;
+
+ [FieldOffset(8)]
+ public int q;
+
+ [FieldOffset(40)]
+ public uint tmp4;
+ [FieldOffset(38)]
+ public byte tmp5;
+
+ public AA(int qq)
+ {
+ tmp1 = 0;
+ tmp2 = 0;
+ tmp3 = 0;
+ tmp4 = 0;
+ tmp5 = 0;
+ q = qq;
+ }
+
+ public static AA[] a_init = new AA[101];
+ public static AA[] a_zero = new AA[101];
+ public static AA[,,] aa_init = new AA[1, 101, 2];
+ public static AA[,,] aa_zero = new AA[1, 101, 2];
+ public static object b_init = new AA(100);
+ public static AA _init, _zero;
+
+ public static int call_target(int arg) { return arg; }
+ public static int call_target_ref(ref int arg) { return arg; }
+
+ public void verify()
+ {
+ }
+
+ public static void verify_all()
+ {
+ a_init[100].verify();
+ a_zero[100].verify();
+ aa_init[0, 99, 1].verify();
+ aa_zero[0, 99, 1].verify();
+ _init.verify();
+ _zero.verify();
+ BB.f_init.verify();
+ BB.f_zero.verify();
+ }
+
+ public static void reset()
+ {
+ a_init[100] = new AA(100);
+ a_zero[100] = new AA(0);
+ aa_init[0, 99, 1] = new AA(100);
+ aa_zero[0, 99, 1] = new AA(0);
+ _init = new AA(100);
+ _zero = new AA(0);
+ BB.f_init = new AA(100);
+ BB.f_zero = new AA(0);
+ }
+}
+
+internal struct BB
+{
+ public static AA f_init, f_zero;
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_int_1_d.csproj b/tests/src/JIT/Methodical/explicit/coverage/expl_int_1_d.csproj
new file mode 100644
index 0000000000..d40866254b
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_int_1_d.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="expl_int_1.cs" />
+ <Compile Include="body_int.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_int_1_r.csproj b/tests/src/JIT/Methodical/explicit/coverage/expl_int_1_r.csproj
new file mode 100644
index 0000000000..d40866254b
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_int_1_r.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="expl_int_1.cs" />
+ <Compile Include="body_int.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_long_1.cs b/tests/src/JIT/Methodical/explicit/coverage/expl_long_1.cs
new file mode 100644
index 0000000000..066bb68998
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_long_1.cs
@@ -0,0 +1,80 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+using System.Runtime.InteropServices;
+
+[StructLayout(LayoutKind.Explicit)]
+internal struct AA
+{
+ [FieldOffset(13)]
+ public long tmp1;
+ [FieldOffset(7)]
+ public long tmp2;
+ [FieldOffset(7)]
+ public long tmp3;
+
+ [FieldOffset(8)]
+ public long q;
+
+ [FieldOffset(36)]
+ public int tmp4;
+ [FieldOffset(44)]
+ public long tmp5;
+ [FieldOffset(39)]
+ public uint tmp6;
+
+ public AA(long qq)
+ {
+ tmp1 = 0;
+ tmp2 = 0;
+ tmp3 = 0;
+ tmp4 = 0;
+ tmp5 = 0;
+ tmp6 = 0;
+ q = qq;
+ }
+
+ public static AA[] a_init = new AA[101];
+ public static AA[] a_zero = new AA[101];
+ public static AA[,,] aa_init = new AA[1, 101, 2];
+ public static AA[,,] aa_zero = new AA[1, 101, 2];
+ public static object b_init = new AA(100);
+ public static AA _init, _zero;
+
+ public static long call_target(long arg) { return arg; }
+ public static long call_target_ref(ref long arg) { return arg; }
+
+ public void verify()
+ {
+ }
+
+ public static void verify_all()
+ {
+ a_init[100].verify();
+ a_zero[100].verify();
+ aa_init[0, 99, 1].verify();
+ aa_zero[0, 99, 1].verify();
+ _init.verify();
+ _zero.verify();
+ BB.f_init.verify();
+ BB.f_zero.verify();
+ }
+
+ public static void reset()
+ {
+ a_init[100] = new AA(100);
+ a_zero[100] = new AA(0);
+ aa_init[0, 99, 1] = new AA(100);
+ aa_zero[0, 99, 1] = new AA(0);
+ _init = new AA(100);
+ _zero = new AA(0);
+ BB.f_init = new AA(100);
+ BB.f_zero = new AA(0);
+ }
+}
+
+internal struct BB
+{
+ public static AA f_init, f_zero;
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_long_1_d.csproj b/tests/src/JIT/Methodical/explicit/coverage/expl_long_1_d.csproj
new file mode 100644
index 0000000000..a4f9e1d100
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_long_1_d.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="expl_long_1.cs" />
+ <Compile Include="body_long.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_long_1_r.csproj b/tests/src/JIT/Methodical/explicit/coverage/expl_long_1_r.csproj
new file mode 100644
index 0000000000..a4f9e1d100
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_long_1_r.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="expl_long_1.cs" />
+ <Compile Include="body_long.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_obj_1.cs b/tests/src/JIT/Methodical/explicit/coverage/expl_obj_1.cs
new file mode 100644
index 0000000000..97c6409595
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_obj_1.cs
@@ -0,0 +1,84 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+using System.Runtime.InteropServices;
+
+internal class QQ
+{
+ public int val;
+ public QQ(int vv) { val = vv; }
+ public int ret_code() { return 100; }
+};
+
+[StructLayout(LayoutKind.Explicit)]
+internal struct AA
+{
+ [FieldOffset(0)]
+ public ulong tmp1;
+ [FieldOffset(7)]
+ public sbyte tmp2;
+ [FieldOffset(4)]
+ public ushort tmp3;
+
+ [FieldOffset(8)]
+ public QQ q; //this field is the testing subject
+
+ [FieldOffset(16)]
+ public int tmp4;
+ [FieldOffset(16)]
+ public float tmp5;
+
+ public AA(int qq)
+ {
+ tmp1 = 0;
+ tmp2 = 0;
+ tmp3 = 0;
+ tmp4 = 0;
+ tmp5 = 0;
+ q = new QQ(qq);
+ }
+
+ public static AA[] a_init = new AA[101];
+ public static AA[] a_zero = new AA[101];
+ public static AA[,,] aa_init = new AA[1, 101, 2];
+ public static AA[,,] aa_zero = new AA[1, 101, 2];
+ public static object b_init = new AA(100);
+ public static AA _init, _zero;
+
+ public static QQ call_target(QQ arg) { return arg; }
+ public static QQ call_target_ref(ref QQ arg) { return arg; }
+
+ public void verify()
+ {
+ }
+
+ public static void verify_all()
+ {
+ a_init[100].verify();
+ a_zero[100].verify();
+ aa_init[0, 99, 1].verify();
+ aa_zero[0, 99, 1].verify();
+ _init.verify();
+ _zero.verify();
+ BB.f_init.verify();
+ BB.f_zero.verify();
+ }
+
+ public static void reset()
+ {
+ a_init[100] = new AA(100);
+ a_zero[100] = new AA(0);
+ aa_init[0, 99, 1] = new AA(100);
+ aa_zero[0, 99, 1] = new AA(0);
+ _init = new AA(100);
+ _zero = new AA(0);
+ BB.f_init = new AA(100);
+ BB.f_zero = new AA(0);
+ }
+}
+
+internal struct BB
+{
+ public static AA f_init, f_zero;
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_obj_1_d.csproj b/tests/src/JIT/Methodical/explicit/coverage/expl_obj_1_d.csproj
new file mode 100644
index 0000000000..441e4dfb50
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_obj_1_d.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="expl_obj_1.cs" />
+ <Compile Include="body_obj.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_obj_1_r.csproj b/tests/src/JIT/Methodical/explicit/coverage/expl_obj_1_r.csproj
new file mode 100644
index 0000000000..441e4dfb50
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_obj_1_r.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="expl_obj_1.cs" />
+ <Compile Include="body_obj.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_short_1.cs b/tests/src/JIT/Methodical/explicit/coverage/expl_short_1.cs
new file mode 100644
index 0000000000..922d4cc64c
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_short_1.cs
@@ -0,0 +1,71 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+using System.Runtime.InteropServices;
+
+[StructLayout(LayoutKind.Explicit)]
+internal struct AA
+{
+ [FieldOffset(7)]
+ public short tmp1;
+
+ [FieldOffset(8)]
+ public short q; //this field is the testing subject
+
+ [FieldOffset(37)]
+ public int tmp2;
+ [FieldOffset(44)]
+ public int tmp3;
+
+ public AA(short qq)
+ {
+ tmp1 = 0;
+ tmp2 = 0;
+ tmp3 = 0;
+ q = qq;
+ }
+
+ public static AA[] a_init = new AA[101];
+ public static AA[] a_zero = new AA[101];
+ public static AA[,,] aa_init = new AA[1, 101, 2];
+ public static AA[,,] aa_zero = new AA[1, 101, 2];
+ public static object b_init = new AA(100);
+ public static AA _init, _zero;
+
+ public static short call_target(short arg) { return arg; }
+ public static short call_target_ref(ref short arg) { return arg; }
+
+ public void verify()
+ {
+ }
+
+ public static void verify_all()
+ {
+ a_init[100].verify();
+ a_zero[100].verify();
+ aa_init[0, 99, 1].verify();
+ aa_zero[0, 99, 1].verify();
+ _init.verify();
+ _zero.verify();
+ BB.f_init.verify();
+ BB.f_zero.verify();
+ }
+
+ public static void reset()
+ {
+ a_init[100] = new AA(100);
+ a_zero[100] = new AA(0);
+ aa_init[0, 99, 1] = new AA(100);
+ aa_zero[0, 99, 1] = new AA(0);
+ _init = new AA(100);
+ _zero = new AA(0);
+ BB.f_init = new AA(100);
+ BB.f_zero = new AA(0);
+ }
+}
+
+internal struct BB
+{
+ public static AA f_init, f_zero;
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_short_1_d.csproj b/tests/src/JIT/Methodical/explicit/coverage/expl_short_1_d.csproj
new file mode 100644
index 0000000000..d7686c440b
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_short_1_d.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="expl_short_1.cs" />
+ <Compile Include="body_short.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_short_1_r.csproj b/tests/src/JIT/Methodical/explicit/coverage/expl_short_1_r.csproj
new file mode 100644
index 0000000000..d7686c440b
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_short_1_r.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="expl_short_1.cs" />
+ <Compile Include="body_short.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_val_1.cs b/tests/src/JIT/Methodical/explicit/coverage/expl_val_1.cs
new file mode 100644
index 0000000000..b9dc659e68
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_val_1.cs
@@ -0,0 +1,84 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+using System.Runtime.InteropServices;
+
+internal struct QQ
+{
+ public int val;
+ public QQ(int vv) { val = vv; }
+ public int ret_code() { return 100; }
+};
+
+[StructLayout(LayoutKind.Explicit)]
+internal struct AA
+{
+ [FieldOffset(10)]
+ public ulong tmp1;
+ [FieldOffset(3)]
+ public long tmp2;
+ [FieldOffset(5)]
+ public ulong tmp3;
+
+ [FieldOffset(8)]
+ public QQ q; //this field is the testing subject
+
+ [FieldOffset(43)]
+ public long tmp4;
+ [FieldOffset(48)]
+ public short tmp5;
+
+ public AA(int qq)
+ {
+ tmp1 = 0;
+ tmp2 = 0;
+ tmp3 = 0;
+ tmp4 = 0;
+ tmp5 = 0;
+ q = new QQ(qq);
+ }
+
+ public static AA[] a_init = new AA[101];
+ public static AA[] a_zero = new AA[101];
+ public static AA[,,] aa_init = new AA[1, 101, 2];
+ public static AA[,,] aa_zero = new AA[1, 101, 2];
+ public static object b_init = new AA(100);
+ public static AA _init, _zero;
+
+ public static QQ call_target(QQ arg) { return arg; }
+ public static QQ call_target_ref(ref QQ arg) { return arg; }
+
+ public void verify()
+ {
+ }
+
+ public static void verify_all()
+ {
+ a_init[100].verify();
+ a_zero[100].verify();
+ aa_init[0, 99, 1].verify();
+ aa_zero[0, 99, 1].verify();
+ _init.verify();
+ _zero.verify();
+ BB.f_init.verify();
+ BB.f_zero.verify();
+ }
+
+ public static void reset()
+ {
+ a_init[100] = new AA(100);
+ a_zero[100] = new AA(0);
+ aa_init[0, 99, 1] = new AA(100);
+ aa_zero[0, 99, 1] = new AA(0);
+ _init = new AA(100);
+ _zero = new AA(0);
+ BB.f_init = new AA(100);
+ BB.f_zero = new AA(0);
+ }
+}
+
+internal struct BB
+{
+ public static AA f_init, f_zero;
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_val_1_d.csproj b/tests/src/JIT/Methodical/explicit/coverage/expl_val_1_d.csproj
new file mode 100644
index 0000000000..46d74a94b2
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_val_1_d.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="expl_val_1.cs" />
+ <Compile Include="body_val.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/expl_val_1_r.csproj b/tests/src/JIT/Methodical/explicit/coverage/expl_val_1_r.csproj
new file mode 100644
index 0000000000..46d74a94b2
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/expl_val_1_r.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="expl_val_1.cs" />
+ <Compile Include="body_val.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_byte_1.cs b/tests/src/JIT/Methodical/explicit/coverage/seq_byte_1.cs
new file mode 100644
index 0000000000..31df8c0733
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_byte_1.cs
@@ -0,0 +1,68 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+using System.Runtime.InteropServices;
+
+[StructLayout(LayoutKind.Sequential)]
+internal struct AA
+{
+ public byte tmp1;
+
+
+ public byte q; //this field is the testing subject
+
+ public sbyte tmp2;
+
+ public AA(byte qq)
+ {
+ tmp1 = 106;
+ tmp2 = 107;
+ q = qq;
+ }
+
+ public static AA[] a_init = new AA[101];
+ public static AA[] a_zero = new AA[101];
+ public static AA[,,] aa_init = new AA[1, 101, 2];
+ public static AA[,,] aa_zero = new AA[1, 101, 2];
+ public static object b_init = new AA(100);
+ public static AA _init, _zero;
+
+ public static byte call_target(byte arg) { return arg; }
+ public static byte call_target_ref(ref byte arg) { return arg; }
+
+ public void verify()
+ {
+ if (tmp1 != 106) throw new Exception("tmp1 corrupted");
+ if (tmp2 != 107) throw new Exception("tmp2 corrupted");
+ }
+
+ public static void verify_all()
+ {
+ a_init[100].verify();
+ a_zero[100].verify();
+ aa_init[0, 99, 1].verify();
+ aa_zero[0, 99, 1].verify();
+ _init.verify();
+ _zero.verify();
+ BB.f_init.verify();
+ BB.f_zero.verify();
+ }
+
+ public static void reset()
+ {
+ a_init[100] = new AA(100);
+ a_zero[100] = new AA(0);
+ aa_init[0, 99, 1] = new AA(100);
+ aa_zero[0, 99, 1] = new AA(0);
+ _init = new AA(100);
+ _zero = new AA(0);
+ BB.f_init = new AA(100);
+ BB.f_zero = new AA(0);
+ }
+}
+
+internal struct BB
+{
+ public static AA f_init, f_zero;
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_byte_1_d.csproj b/tests/src/JIT/Methodical/explicit/coverage/seq_byte_1_d.csproj
new file mode 100644
index 0000000000..ec2a01b729
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_byte_1_d.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="seq_byte_1.cs" />
+ <Compile Include="body_byte.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_byte_1_r.csproj b/tests/src/JIT/Methodical/explicit/coverage/seq_byte_1_r.csproj
new file mode 100644
index 0000000000..ec2a01b729
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_byte_1_r.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="seq_byte_1.cs" />
+ <Compile Include="body_byte.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_double_1.cs b/tests/src/JIT/Methodical/explicit/coverage/seq_double_1.cs
new file mode 100644
index 0000000000..8e991a09c1
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_double_1.cs
@@ -0,0 +1,67 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+using System.Runtime.InteropServices;
+
+[StructLayout(LayoutKind.Sequential)]
+internal struct AA
+{
+ public byte tmp1;
+
+ public double q;
+
+ public byte tmp2;
+
+ public AA(double qq)
+ {
+ tmp1 = 106;
+ tmp2 = 107;
+ q = qq;
+ }
+
+ public static AA[] a_init = new AA[101];
+ public static AA[] a_zero = new AA[101];
+ public static AA[,,] aa_init = new AA[1, 101, 2];
+ public static AA[,,] aa_zero = new AA[1, 101, 2];
+ public static object b_init = new AA(100);
+ public static AA _init, _zero;
+
+ public static double call_target(double arg) { return arg; }
+ public static double call_target_ref(ref double arg) { return arg; }
+
+ public void verify()
+ {
+ if (tmp1 != 106) throw new Exception("tmp1 corrupted");
+ if (tmp2 != 107) throw new Exception("tmp2 corrupted");
+ }
+
+ public static void verify_all()
+ {
+ a_init[100].verify();
+ a_zero[100].verify();
+ aa_init[0, 99, 1].verify();
+ aa_zero[0, 99, 1].verify();
+ _init.verify();
+ _zero.verify();
+ BB.f_init.verify();
+ BB.f_zero.verify();
+ }
+
+ public static void reset()
+ {
+ a_init[100] = new AA(100);
+ a_zero[100] = new AA(0);
+ aa_init[0, 99, 1] = new AA(100);
+ aa_zero[0, 99, 1] = new AA(0);
+ _init = new AA(100);
+ _zero = new AA(0);
+ BB.f_init = new AA(100);
+ BB.f_zero = new AA(0);
+ }
+}
+
+internal struct BB
+{
+ public static AA f_init, f_zero;
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_double_1_d.csproj b/tests/src/JIT/Methodical/explicit/coverage/seq_double_1_d.csproj
new file mode 100644
index 0000000000..e9852de273
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_double_1_d.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="seq_double_1.cs" />
+ <Compile Include="body_double.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_double_1_r.csproj b/tests/src/JIT/Methodical/explicit/coverage/seq_double_1_r.csproj
new file mode 100644
index 0000000000..e9852de273
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_double_1_r.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="seq_double_1.cs" />
+ <Compile Include="body_double.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_float_1.cs b/tests/src/JIT/Methodical/explicit/coverage/seq_float_1.cs
new file mode 100644
index 0000000000..5bed4ca33e
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_float_1.cs
@@ -0,0 +1,67 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+using System.Runtime.InteropServices;
+
+[StructLayout(LayoutKind.Sequential)]
+internal struct AA
+{
+ public byte tmp1;
+
+ public float q;
+
+ public short tmp2;
+
+ public AA(float qq)
+ {
+ tmp1 = 106;
+ tmp2 = 107;
+ q = qq;
+ }
+
+ public static AA[] a_init = new AA[101];
+ public static AA[] a_zero = new AA[101];
+ public static AA[,,] aa_init = new AA[1, 101, 2];
+ public static AA[,,] aa_zero = new AA[1, 101, 2];
+ public static object b_init = new AA(100);
+ public static AA _init, _zero;
+
+ public static float call_target(float arg) { return arg; }
+ public static float call_target_ref(ref float arg) { return arg; }
+
+ public void verify()
+ {
+ if (tmp1 != 106) throw new Exception("tmp1 corrupted");
+ if (tmp2 != 107) throw new Exception("tmp2 corrupted");
+ }
+
+ public static void verify_all()
+ {
+ a_init[100].verify();
+ a_zero[100].verify();
+ aa_init[0, 99, 1].verify();
+ aa_zero[0, 99, 1].verify();
+ _init.verify();
+ _zero.verify();
+ BB.f_init.verify();
+ BB.f_zero.verify();
+ }
+
+ public static void reset()
+ {
+ a_init[100] = new AA(100);
+ a_zero[100] = new AA(0);
+ aa_init[0, 99, 1] = new AA(100);
+ aa_zero[0, 99, 1] = new AA(0);
+ _init = new AA(100);
+ _zero = new AA(0);
+ BB.f_init = new AA(100);
+ BB.f_zero = new AA(0);
+ }
+}
+
+internal struct BB
+{
+ public static AA f_init, f_zero;
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_float_1_d.csproj b/tests/src/JIT/Methodical/explicit/coverage/seq_float_1_d.csproj
new file mode 100644
index 0000000000..b5992351f0
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_float_1_d.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="seq_float_1.cs" />
+ <Compile Include="body_float.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_float_1_r.csproj b/tests/src/JIT/Methodical/explicit/coverage/seq_float_1_r.csproj
new file mode 100644
index 0000000000..b5992351f0
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_float_1_r.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="seq_float_1.cs" />
+ <Compile Include="body_float.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_gc_byte_1.cs b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_byte_1.cs
new file mode 100644
index 0000000000..a0def98e57
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_byte_1.cs
@@ -0,0 +1,71 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+using System.Runtime.InteropServices;
+
+[StructLayout(LayoutKind.Sequential)]
+internal class AA
+{
+ public short tmp1;
+
+
+ public byte q; //this field is the testing subject
+
+ public ushort tmp2;
+ public int tmp3;
+
+ public AA(byte qq)
+ {
+ tmp1 = 106;
+ tmp2 = 107;
+ tmp3 = 108;
+ q = qq;
+ }
+
+ public static AA[] a_init = new AA[101];
+ public static AA[] a_zero = new AA[101];
+ public static AA[,,] aa_init = new AA[1, 101, 2];
+ public static AA[,,] aa_zero = new AA[1, 101, 2];
+ public static object b_init = new AA(100);
+ public static AA _init, _zero;
+
+ public static byte call_target(byte arg) { return arg; }
+ public static byte call_target_ref(ref byte arg) { return arg; }
+
+ public void verify()
+ {
+ if (tmp1 != 106) throw new Exception("tmp1 corrupted");
+ if (tmp2 != 107) throw new Exception("tmp2 corrupted");
+ if (tmp3 != 108) throw new Exception("tmp3 corrupted");
+ }
+
+ public static void verify_all()
+ {
+ a_init[100].verify();
+ a_zero[100].verify();
+ aa_init[0, 99, 1].verify();
+ aa_zero[0, 99, 1].verify();
+ _init.verify();
+ _zero.verify();
+ BB.f_init.verify();
+ BB.f_zero.verify();
+ }
+
+ public static void reset()
+ {
+ a_init[100] = new AA(100);
+ a_zero[100] = new AA(0);
+ aa_init[0, 99, 1] = new AA(100);
+ aa_zero[0, 99, 1] = new AA(0);
+ _init = new AA(100);
+ _zero = new AA(0);
+ BB.f_init = new AA(100);
+ BB.f_zero = new AA(0);
+ }
+}
+
+internal struct BB
+{
+ public static AA f_init, f_zero;
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_gc_byte_1_d.csproj b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_byte_1_d.csproj
new file mode 100644
index 0000000000..b29d94b202
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_byte_1_d.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="seq_gc_byte_1.cs" />
+ <Compile Include="body_safe_byte.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_gc_byte_1_r.csproj b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_byte_1_r.csproj
new file mode 100644
index 0000000000..b29d94b202
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_byte_1_r.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="seq_gc_byte_1.cs" />
+ <Compile Include="body_safe_byte.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_gc_double_1.cs b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_double_1.cs
new file mode 100644
index 0000000000..d6e5481c58
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_double_1.cs
@@ -0,0 +1,76 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+using System.Runtime.InteropServices;
+
+[StructLayout(LayoutKind.Sequential)]
+internal class AA
+{
+ public ulong tmp1;
+ public long tmp2;
+ public sbyte tmp3;
+
+ public double q;
+
+ public int tmp4;
+ public ushort tmp5;
+
+ public AA(double qq)
+ {
+ tmp1 = 106;
+ tmp2 = 107;
+ tmp3 = 108;
+ tmp4 = 109;
+ tmp5 = 110;
+ q = qq;
+ }
+
+ public static AA[] a_init = new AA[101];
+ public static AA[] a_zero = new AA[101];
+ public static AA[,,] aa_init = new AA[1, 101, 2];
+ public static AA[,,] aa_zero = new AA[1, 101, 2];
+ public static object b_init = new AA(100);
+ public static AA _init, _zero;
+
+ public static double call_target(double arg) { return arg; }
+ public static double call_target_ref(ref double arg) { return arg; }
+
+ public void verify()
+ {
+ if (tmp1 != 106) throw new Exception("tmp1 corrupted");
+ if (tmp2 != 107) throw new Exception("tmp2 corrupted");
+ if (tmp3 != 108) throw new Exception("tmp3 corrupted");
+ if (tmp4 != 109) throw new Exception("tmp4 corrupted");
+ if (tmp5 != 110) throw new Exception("tmp5 corrupted");
+ }
+
+ public static void verify_all()
+ {
+ a_init[100].verify();
+ a_zero[100].verify();
+ aa_init[0, 99, 1].verify();
+ aa_zero[0, 99, 1].verify();
+ _init.verify();
+ _zero.verify();
+ BB.f_init.verify();
+ BB.f_zero.verify();
+ }
+
+ public static void reset()
+ {
+ a_init[100] = new AA(100);
+ a_zero[100] = new AA(0);
+ aa_init[0, 99, 1] = new AA(100);
+ aa_zero[0, 99, 1] = new AA(0);
+ _init = new AA(100);
+ _zero = new AA(0);
+ BB.f_init = new AA(100);
+ BB.f_zero = new AA(0);
+ }
+}
+
+internal struct BB
+{
+ public static AA f_init, f_zero;
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_gc_double_1_d.csproj b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_double_1_d.csproj
new file mode 100644
index 0000000000..2bdd6878ab
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_double_1_d.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="seq_gc_double_1.cs" />
+ <Compile Include="body_safe_double.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_gc_double_1_r.csproj b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_double_1_r.csproj
new file mode 100644
index 0000000000..2bdd6878ab
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_double_1_r.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="seq_gc_double_1.cs" />
+ <Compile Include="body_safe_double.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_gc_float_1.cs b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_float_1.cs
new file mode 100644
index 0000000000..a63afa8d1a
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_float_1.cs
@@ -0,0 +1,79 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+using System.Runtime.InteropServices;
+
+[StructLayout(LayoutKind.Sequential)]
+internal class AA
+{
+ public long tmp1;
+ public float tmp2;
+ public long tmp3;
+
+ public float q;
+
+ public ushort tmp4;
+ public long tmp5;
+ public ushort tmp6;
+
+ public AA(float qq)
+ {
+ tmp1 = 106;
+ tmp2 = 107;
+ tmp3 = 108;
+ tmp4 = 109;
+ tmp5 = 110;
+ tmp6 = 111;
+ q = qq;
+ }
+
+ public static AA[] a_init = new AA[101];
+ public static AA[] a_zero = new AA[101];
+ public static AA[,,] aa_init = new AA[1, 101, 2];
+ public static AA[,,] aa_zero = new AA[1, 101, 2];
+ public static object b_init = new AA(100);
+ public static AA _init, _zero;
+
+ public static float call_target(float arg) { return arg; }
+ public static float call_target_ref(ref float arg) { return arg; }
+
+ public void verify()
+ {
+ if (tmp1 != 106) throw new Exception("tmp1 corrupted");
+ if (tmp2 != 107) throw new Exception("tmp2 corrupted");
+ if (tmp3 != 108) throw new Exception("tmp3 corrupted");
+ if (tmp4 != 109) throw new Exception("tmp4 corrupted");
+ if (tmp5 != 110) throw new Exception("tmp5 corrupted");
+ if (tmp6 != 111) throw new Exception("tmp6 corrupted");
+ }
+
+ public static void verify_all()
+ {
+ a_init[100].verify();
+ a_zero[100].verify();
+ aa_init[0, 99, 1].verify();
+ aa_zero[0, 99, 1].verify();
+ _init.verify();
+ _zero.verify();
+ BB.f_init.verify();
+ BB.f_zero.verify();
+ }
+
+ public static void reset()
+ {
+ a_init[100] = new AA(100);
+ a_zero[100] = new AA(0);
+ aa_init[0, 99, 1] = new AA(100);
+ aa_zero[0, 99, 1] = new AA(0);
+ _init = new AA(100);
+ _zero = new AA(0);
+ BB.f_init = new AA(100);
+ BB.f_zero = new AA(0);
+ }
+}
+
+internal struct BB
+{
+ public static AA f_init, f_zero;
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_gc_float_1_d.csproj b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_float_1_d.csproj
new file mode 100644
index 0000000000..641ac4f88f
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_float_1_d.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="seq_gc_float_1.cs" />
+ <Compile Include="body_safe_float.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_gc_float_1_r.csproj b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_float_1_r.csproj
new file mode 100644
index 0000000000..641ac4f88f
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_float_1_r.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="seq_gc_float_1.cs" />
+ <Compile Include="body_safe_float.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_gc_int_1.cs b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_int_1.cs
new file mode 100644
index 0000000000..08fdfb8027
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_int_1.cs
@@ -0,0 +1,70 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+using System.Runtime.InteropServices;
+
+[StructLayout(LayoutKind.Sequential)]
+internal class AA
+{
+ public short tmp1;
+
+ public int q;
+
+ public ushort tmp2;
+ public int tmp3;
+
+ public AA(int qq)
+ {
+ tmp1 = 106;
+ tmp2 = 107;
+ tmp3 = 108;
+ q = qq;
+ }
+
+ public static AA[] a_init = new AA[101];
+ public static AA[] a_zero = new AA[101];
+ public static AA[,,] aa_init = new AA[1, 101, 2];
+ public static AA[,,] aa_zero = new AA[1, 101, 2];
+ public static object b_init = new AA(100);
+ public static AA _init, _zero;
+
+ public static int call_target(int arg) { return arg; }
+ public static int call_target_ref(ref int arg) { return arg; }
+
+ public void verify()
+ {
+ if (tmp1 != 106) throw new Exception("tmp1 corrupted");
+ if (tmp2 != 107) throw new Exception("tmp2 corrupted");
+ if (tmp3 != 108) throw new Exception("tmp3 corrupted");
+ }
+
+ public static void verify_all()
+ {
+ a_init[100].verify();
+ a_zero[100].verify();
+ aa_init[0, 99, 1].verify();
+ aa_zero[0, 99, 1].verify();
+ _init.verify();
+ _zero.verify();
+ BB.f_init.verify();
+ BB.f_zero.verify();
+ }
+
+ public static void reset()
+ {
+ a_init[100] = new AA(100);
+ a_zero[100] = new AA(0);
+ aa_init[0, 99, 1] = new AA(100);
+ aa_zero[0, 99, 1] = new AA(0);
+ _init = new AA(100);
+ _zero = new AA(0);
+ BB.f_init = new AA(100);
+ BB.f_zero = new AA(0);
+ }
+}
+
+internal struct BB
+{
+ public static AA f_init, f_zero;
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_gc_int_1_d.csproj b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_int_1_d.csproj
new file mode 100644
index 0000000000..3220c40722
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_int_1_d.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="seq_gc_int_1.cs" />
+ <Compile Include="body_safe_int.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_gc_int_1_r.csproj b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_int_1_r.csproj
new file mode 100644
index 0000000000..3220c40722
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_int_1_r.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="seq_gc_int_1.cs" />
+ <Compile Include="body_safe_int.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_gc_long_1.cs b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_long_1.cs
new file mode 100644
index 0000000000..9ac3589fc5
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_long_1.cs
@@ -0,0 +1,67 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+using System.Runtime.InteropServices;
+
+[StructLayout(LayoutKind.Sequential)]
+internal class AA
+{
+ public byte tmp1;
+
+ public long q;
+
+ public short tmp2;
+
+ public AA(long qq)
+ {
+ tmp1 = 106;
+ tmp2 = 107;
+ q = qq;
+ }
+
+ public static AA[] a_init = new AA[101];
+ public static AA[] a_zero = new AA[101];
+ public static AA[,,] aa_init = new AA[1, 101, 2];
+ public static AA[,,] aa_zero = new AA[1, 101, 2];
+ public static object b_init = new AA(100);
+ public static AA _init, _zero;
+
+ public static long call_target(long arg) { return arg; }
+ public static long call_target_ref(ref long arg) { return arg; }
+
+ public void verify()
+ {
+ if (tmp1 != 106) throw new Exception("tmp1 corrupted");
+ if (tmp2 != 107) throw new Exception("tmp2 corrupted");
+ }
+
+ public static void verify_all()
+ {
+ a_init[100].verify();
+ a_zero[100].verify();
+ aa_init[0, 99, 1].verify();
+ aa_zero[0, 99, 1].verify();
+ _init.verify();
+ _zero.verify();
+ BB.f_init.verify();
+ BB.f_zero.verify();
+ }
+
+ public static void reset()
+ {
+ a_init[100] = new AA(100);
+ a_zero[100] = new AA(0);
+ aa_init[0, 99, 1] = new AA(100);
+ aa_zero[0, 99, 1] = new AA(0);
+ _init = new AA(100);
+ _zero = new AA(0);
+ BB.f_init = new AA(100);
+ BB.f_zero = new AA(0);
+ }
+}
+
+internal struct BB
+{
+ public static AA f_init, f_zero;
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_gc_long_1_d.csproj b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_long_1_d.csproj
new file mode 100644
index 0000000000..2bcdfd3fb9
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_long_1_d.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="seq_gc_long_1.cs" />
+ <Compile Include="body_safe_long.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_gc_long_1_r.csproj b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_long_1_r.csproj
new file mode 100644
index 0000000000..2bcdfd3fb9
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_long_1_r.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="seq_gc_long_1.cs" />
+ <Compile Include="body_safe_long.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_gc_obj_1.cs b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_obj_1.cs
new file mode 100644
index 0000000000..87a3af75e4
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_obj_1.cs
@@ -0,0 +1,75 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+using System.Runtime.InteropServices;
+
+internal class QQ
+{
+ public int val;
+ public QQ(int vv) { val = vv; }
+ public int ret_code() { return 100; }
+};
+
+[StructLayout(LayoutKind.Sequential)]
+internal class AA
+{
+ public byte tmp1;
+
+
+ public QQ q; //this field is the testing subject
+
+ public byte tmp2;
+
+ public AA(int qq)
+ {
+ tmp1 = 106;
+ tmp2 = 107;
+ q = new QQ(qq);
+ }
+
+ public static AA[] a_init = new AA[101];
+ public static AA[] a_zero = new AA[101];
+ public static AA[,,] aa_init = new AA[1, 101, 2];
+ public static AA[,,] aa_zero = new AA[1, 101, 2];
+ public static object b_init = new AA(100);
+ public static AA _init, _zero;
+
+ public static QQ call_target(QQ arg) { return arg; }
+ public static QQ call_target_ref(ref QQ arg) { return arg; }
+
+ public void verify()
+ {
+ if (tmp1 != 106) throw new Exception("tmp1 corrupted");
+ if (tmp2 != 107) throw new Exception("tmp2 corrupted");
+ }
+
+ public static void verify_all()
+ {
+ a_init[100].verify();
+ a_zero[100].verify();
+ aa_init[0, 99, 1].verify();
+ aa_zero[0, 99, 1].verify();
+ _init.verify();
+ _zero.verify();
+ BB.f_init.verify();
+ BB.f_zero.verify();
+ }
+
+ public static void reset()
+ {
+ a_init[100] = new AA(100);
+ a_zero[100] = new AA(0);
+ aa_init[0, 99, 1] = new AA(100);
+ aa_zero[0, 99, 1] = new AA(0);
+ _init = new AA(100);
+ _zero = new AA(0);
+ BB.f_init = new AA(100);
+ BB.f_zero = new AA(0);
+ }
+}
+
+internal struct BB
+{
+ public static AA f_init, f_zero;
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_gc_obj_1_d.csproj b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_obj_1_d.csproj
new file mode 100644
index 0000000000..e1145f904a
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_obj_1_d.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="seq_gc_obj_1.cs" />
+ <Compile Include="body_safe_obj.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_gc_obj_1_r.csproj b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_obj_1_r.csproj
new file mode 100644
index 0000000000..e1145f904a
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_obj_1_r.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="seq_gc_obj_1.cs" />
+ <Compile Include="body_safe_obj.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_gc_short_1.cs b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_short_1.cs
new file mode 100644
index 0000000000..3cd4700051
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_short_1.cs
@@ -0,0 +1,77 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+using System.Runtime.InteropServices;
+
+[StructLayout(LayoutKind.Sequential)]
+internal class AA
+{
+ public ulong tmp1;
+ public ulong tmp2;
+ public sbyte tmp3;
+
+
+ public short q; //this field is the testing subject
+
+ public sbyte tmp4;
+ public byte tmp5;
+
+ public AA(short qq)
+ {
+ tmp1 = 106;
+ tmp2 = 107;
+ tmp3 = 108;
+ tmp4 = 109;
+ tmp5 = 110;
+ q = qq;
+ }
+
+ public static AA[] a_init = new AA[101];
+ public static AA[] a_zero = new AA[101];
+ public static AA[,,] aa_init = new AA[1, 101, 2];
+ public static AA[,,] aa_zero = new AA[1, 101, 2];
+ public static object b_init = new AA(100);
+ public static AA _init, _zero;
+
+ public static short call_target(short arg) { return arg; }
+ public static short call_target_ref(ref short arg) { return arg; }
+
+ public void verify()
+ {
+ if (tmp1 != 106) throw new Exception("tmp1 corrupted");
+ if (tmp2 != 107) throw new Exception("tmp2 corrupted");
+ if (tmp3 != 108) throw new Exception("tmp3 corrupted");
+ if (tmp4 != 109) throw new Exception("tmp4 corrupted");
+ if (tmp5 != 110) throw new Exception("tmp5 corrupted");
+ }
+
+ public static void verify_all()
+ {
+ a_init[100].verify();
+ a_zero[100].verify();
+ aa_init[0, 99, 1].verify();
+ aa_zero[0, 99, 1].verify();
+ _init.verify();
+ _zero.verify();
+ BB.f_init.verify();
+ BB.f_zero.verify();
+ }
+
+ public static void reset()
+ {
+ a_init[100] = new AA(100);
+ a_zero[100] = new AA(0);
+ aa_init[0, 99, 1] = new AA(100);
+ aa_zero[0, 99, 1] = new AA(0);
+ _init = new AA(100);
+ _zero = new AA(0);
+ BB.f_init = new AA(100);
+ BB.f_zero = new AA(0);
+ }
+}
+
+internal struct BB
+{
+ public static AA f_init, f_zero;
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_gc_short_1_d.csproj b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_short_1_d.csproj
new file mode 100644
index 0000000000..f92c7a1cbc
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_short_1_d.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="seq_gc_short_1.cs" />
+ <Compile Include="body_safe_short.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_gc_short_1_r.csproj b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_short_1_r.csproj
new file mode 100644
index 0000000000..f92c7a1cbc
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_short_1_r.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="seq_gc_short_1.cs" />
+ <Compile Include="body_safe_short.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_gc_val_1.cs b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_val_1.cs
new file mode 100644
index 0000000000..d80c91a2a7
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_val_1.cs
@@ -0,0 +1,84 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+using System.Runtime.InteropServices;
+
+internal struct QQ
+{
+ public int val;
+ public QQ(int vv) { val = vv; }
+ public int ret_code() { return 100; }
+};
+
+[StructLayout(LayoutKind.Sequential)]
+internal class AA
+{
+ public ulong tmp1;
+ public long tmp2;
+ public sbyte tmp3;
+
+
+ public QQ q; //this field is the testing subject
+
+ public int tmp4;
+ public ushort tmp5;
+
+ public AA(int qq)
+ {
+ tmp1 = 106;
+ tmp2 = 107;
+ tmp3 = 108;
+ tmp4 = 109;
+ tmp5 = 110;
+ q = new QQ(qq);
+ }
+
+ public static AA[] a_init = new AA[101];
+ public static AA[] a_zero = new AA[101];
+ public static AA[,,] aa_init = new AA[1, 101, 2];
+ public static AA[,,] aa_zero = new AA[1, 101, 2];
+ public static object b_init = new AA(100);
+ public static AA _init, _zero;
+
+ public static QQ call_target(QQ arg) { return arg; }
+ public static QQ call_target_ref(ref QQ arg) { return arg; }
+
+ public void verify()
+ {
+ if (tmp1 != 106) throw new Exception("tmp1 corrupted");
+ if (tmp2 != 107) throw new Exception("tmp2 corrupted");
+ if (tmp3 != 108) throw new Exception("tmp3 corrupted");
+ if (tmp4 != 109) throw new Exception("tmp4 corrupted");
+ if (tmp5 != 110) throw new Exception("tmp5 corrupted");
+ }
+
+ public static void verify_all()
+ {
+ a_init[100].verify();
+ a_zero[100].verify();
+ aa_init[0, 99, 1].verify();
+ aa_zero[0, 99, 1].verify();
+ _init.verify();
+ _zero.verify();
+ BB.f_init.verify();
+ BB.f_zero.verify();
+ }
+
+ public static void reset()
+ {
+ a_init[100] = new AA(100);
+ a_zero[100] = new AA(0);
+ aa_init[0, 99, 1] = new AA(100);
+ aa_zero[0, 99, 1] = new AA(0);
+ _init = new AA(100);
+ _zero = new AA(0);
+ BB.f_init = new AA(100);
+ BB.f_zero = new AA(0);
+ }
+}
+
+internal struct BB
+{
+ public static AA f_init, f_zero;
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_gc_val_1_d.csproj b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_val_1_d.csproj
new file mode 100644
index 0000000000..a1d8770e5a
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_val_1_d.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="seq_gc_val_1.cs" />
+ <Compile Include="body_safe_val.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_gc_val_1_r.csproj b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_val_1_r.csproj
new file mode 100644
index 0000000000..a1d8770e5a
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_gc_val_1_r.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="seq_gc_val_1.cs" />
+ <Compile Include="body_safe_val.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_int_1.cs b/tests/src/JIT/Methodical/explicit/coverage/seq_int_1.cs
new file mode 100644
index 0000000000..815e2d52d5
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_int_1.cs
@@ -0,0 +1,76 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+using System.Runtime.InteropServices;
+
+[StructLayout(LayoutKind.Sequential)]
+internal struct AA
+{
+ public ulong tmp1;
+ public ulong tmp2;
+ public sbyte tmp3;
+
+ public int q;
+
+ public sbyte tmp4;
+ public byte tmp5;
+
+ public AA(int qq)
+ {
+ tmp1 = 106;
+ tmp2 = 107;
+ tmp3 = 108;
+ tmp4 = 109;
+ tmp5 = 110;
+ q = qq;
+ }
+
+ public static AA[] a_init = new AA[101];
+ public static AA[] a_zero = new AA[101];
+ public static AA[,,] aa_init = new AA[1, 101, 2];
+ public static AA[,,] aa_zero = new AA[1, 101, 2];
+ public static object b_init = new AA(100);
+ public static AA _init, _zero;
+
+ public static int call_target(int arg) { return arg; }
+ public static int call_target_ref(ref int arg) { return arg; }
+
+ public void verify()
+ {
+ if (tmp1 != 106) throw new Exception("tmp1 corrupted");
+ if (tmp2 != 107) throw new Exception("tmp2 corrupted");
+ if (tmp3 != 108) throw new Exception("tmp3 corrupted");
+ if (tmp4 != 109) throw new Exception("tmp4 corrupted");
+ if (tmp5 != 110) throw new Exception("tmp5 corrupted");
+ }
+
+ public static void verify_all()
+ {
+ a_init[100].verify();
+ a_zero[100].verify();
+ aa_init[0, 99, 1].verify();
+ aa_zero[0, 99, 1].verify();
+ _init.verify();
+ _zero.verify();
+ BB.f_init.verify();
+ BB.f_zero.verify();
+ }
+
+ public static void reset()
+ {
+ a_init[100] = new AA(100);
+ a_zero[100] = new AA(0);
+ aa_init[0, 99, 1] = new AA(100);
+ aa_zero[0, 99, 1] = new AA(0);
+ _init = new AA(100);
+ _zero = new AA(0);
+ BB.f_init = new AA(100);
+ BB.f_zero = new AA(0);
+ }
+}
+
+internal struct BB
+{
+ public static AA f_init, f_zero;
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_int_1_d.csproj b/tests/src/JIT/Methodical/explicit/coverage/seq_int_1_d.csproj
new file mode 100644
index 0000000000..1b10c3dcdc
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_int_1_d.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="seq_int_1.cs" />
+ <Compile Include="body_int.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_int_1_r.csproj b/tests/src/JIT/Methodical/explicit/coverage/seq_int_1_r.csproj
new file mode 100644
index 0000000000..1b10c3dcdc
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_int_1_r.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="seq_int_1.cs" />
+ <Compile Include="body_int.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_long_1.cs b/tests/src/JIT/Methodical/explicit/coverage/seq_long_1.cs
new file mode 100644
index 0000000000..e0bdf7cfa9
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_long_1.cs
@@ -0,0 +1,79 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+using System.Runtime.InteropServices;
+
+[StructLayout(LayoutKind.Sequential)]
+internal struct AA
+{
+ public long tmp1;
+ public float tmp2;
+ public long tmp3;
+
+ public long q;
+
+ public ushort tmp4;
+ public long tmp5;
+ public ushort tmp6;
+
+ public AA(long qq)
+ {
+ tmp1 = 106;
+ tmp2 = 107;
+ tmp3 = 108;
+ tmp4 = 109;
+ tmp5 = 110;
+ tmp6 = 111;
+ q = qq;
+ }
+
+ public static AA[] a_init = new AA[101];
+ public static AA[] a_zero = new AA[101];
+ public static AA[,,] aa_init = new AA[1, 101, 2];
+ public static AA[,,] aa_zero = new AA[1, 101, 2];
+ public static object b_init = new AA(100);
+ public static AA _init, _zero;
+
+ public static long call_target(long arg) { return arg; }
+ public static long call_target_ref(ref long arg) { return arg; }
+
+ public void verify()
+ {
+ if (tmp1 != 106) throw new Exception("tmp1 corrupted");
+ if (tmp2 != 107) throw new Exception("tmp2 corrupted");
+ if (tmp3 != 108) throw new Exception("tmp3 corrupted");
+ if (tmp4 != 109) throw new Exception("tmp4 corrupted");
+ if (tmp5 != 110) throw new Exception("tmp5 corrupted");
+ if (tmp6 != 111) throw new Exception("tmp6 corrupted");
+ }
+
+ public static void verify_all()
+ {
+ a_init[100].verify();
+ a_zero[100].verify();
+ aa_init[0, 99, 1].verify();
+ aa_zero[0, 99, 1].verify();
+ _init.verify();
+ _zero.verify();
+ BB.f_init.verify();
+ BB.f_zero.verify();
+ }
+
+ public static void reset()
+ {
+ a_init[100] = new AA(100);
+ a_zero[100] = new AA(0);
+ aa_init[0, 99, 1] = new AA(100);
+ aa_zero[0, 99, 1] = new AA(0);
+ _init = new AA(100);
+ _zero = new AA(0);
+ BB.f_init = new AA(100);
+ BB.f_zero = new AA(0);
+ }
+}
+
+internal struct BB
+{
+ public static AA f_init, f_zero;
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_long_1_d.csproj b/tests/src/JIT/Methodical/explicit/coverage/seq_long_1_d.csproj
new file mode 100644
index 0000000000..f3026c1780
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_long_1_d.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="seq_long_1.cs" />
+ <Compile Include="body_long.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_long_1_r.csproj b/tests/src/JIT/Methodical/explicit/coverage/seq_long_1_r.csproj
new file mode 100644
index 0000000000..f3026c1780
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_long_1_r.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="seq_long_1.cs" />
+ <Compile Include="body_long.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_obj_1.cs b/tests/src/JIT/Methodical/explicit/coverage/seq_obj_1.cs
new file mode 100644
index 0000000000..ef2b517ddd
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_obj_1.cs
@@ -0,0 +1,84 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+using System.Runtime.InteropServices;
+
+internal class QQ
+{
+ public int val;
+ public QQ(int vv) { val = vv; }
+ public int ret_code() { return 100; }
+};
+
+[StructLayout(LayoutKind.Sequential)]
+internal struct AA
+{
+ public ulong tmp1;
+ public long tmp2;
+ public sbyte tmp3;
+
+
+ public QQ q; //this field is the testing subject
+
+ public int tmp4;
+ public ushort tmp5;
+
+ public AA(int qq)
+ {
+ tmp1 = 106;
+ tmp2 = 107;
+ tmp3 = 108;
+ tmp4 = 109;
+ tmp5 = 110;
+ q = new QQ(qq);
+ }
+
+ public static AA[] a_init = new AA[101];
+ public static AA[] a_zero = new AA[101];
+ public static AA[,,] aa_init = new AA[1, 101, 2];
+ public static AA[,,] aa_zero = new AA[1, 101, 2];
+ public static object b_init = new AA(100);
+ public static AA _init, _zero;
+
+ public static QQ call_target(QQ arg) { return arg; }
+ public static QQ call_target_ref(ref QQ arg) { return arg; }
+
+ public void verify()
+ {
+ if (tmp1 != 106) throw new Exception("tmp1 corrupted");
+ if (tmp2 != 107) throw new Exception("tmp2 corrupted");
+ if (tmp3 != 108) throw new Exception("tmp3 corrupted");
+ if (tmp4 != 109) throw new Exception("tmp4 corrupted");
+ if (tmp5 != 110) throw new Exception("tmp5 corrupted");
+ }
+
+ public static void verify_all()
+ {
+ a_init[100].verify();
+ a_zero[100].verify();
+ aa_init[0, 99, 1].verify();
+ aa_zero[0, 99, 1].verify();
+ _init.verify();
+ _zero.verify();
+ BB.f_init.verify();
+ BB.f_zero.verify();
+ }
+
+ public static void reset()
+ {
+ a_init[100] = new AA(100);
+ a_zero[100] = new AA(0);
+ aa_init[0, 99, 1] = new AA(100);
+ aa_zero[0, 99, 1] = new AA(0);
+ _init = new AA(100);
+ _zero = new AA(0);
+ BB.f_init = new AA(100);
+ BB.f_zero = new AA(0);
+ }
+}
+
+internal struct BB
+{
+ public static AA f_init, f_zero;
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_obj_1_d.csproj b/tests/src/JIT/Methodical/explicit/coverage/seq_obj_1_d.csproj
new file mode 100644
index 0000000000..0d37a063be
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_obj_1_d.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="seq_obj_1.cs" />
+ <Compile Include="body_obj.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_obj_1_r.csproj b/tests/src/JIT/Methodical/explicit/coverage/seq_obj_1_r.csproj
new file mode 100644
index 0000000000..0d37a063be
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_obj_1_r.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="seq_obj_1.cs" />
+ <Compile Include="body_obj.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_short_1.cs b/tests/src/JIT/Methodical/explicit/coverage/seq_short_1.cs
new file mode 100644
index 0000000000..5cb93cfe41
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_short_1.cs
@@ -0,0 +1,71 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+using System.Runtime.InteropServices;
+
+[StructLayout(LayoutKind.Sequential)]
+internal struct AA
+{
+ public short tmp1;
+
+
+ public short q; //this field is the testing subject
+
+ public ushort tmp2;
+ public int tmp3;
+
+ public AA(short qq)
+ {
+ tmp1 = 106;
+ tmp2 = 107;
+ tmp3 = 108;
+ q = qq;
+ }
+
+ public static AA[] a_init = new AA[101];
+ public static AA[] a_zero = new AA[101];
+ public static AA[,,] aa_init = new AA[1, 101, 2];
+ public static AA[,,] aa_zero = new AA[1, 101, 2];
+ public static object b_init = new AA(100);
+ public static AA _init, _zero;
+
+ public static short call_target(short arg) { return arg; }
+ public static short call_target_ref(ref short arg) { return arg; }
+
+ public void verify()
+ {
+ if (tmp1 != 106) throw new Exception("tmp1 corrupted");
+ if (tmp2 != 107) throw new Exception("tmp2 corrupted");
+ if (tmp3 != 108) throw new Exception("tmp3 corrupted");
+ }
+
+ public static void verify_all()
+ {
+ a_init[100].verify();
+ a_zero[100].verify();
+ aa_init[0, 99, 1].verify();
+ aa_zero[0, 99, 1].verify();
+ _init.verify();
+ _zero.verify();
+ BB.f_init.verify();
+ BB.f_zero.verify();
+ }
+
+ public static void reset()
+ {
+ a_init[100] = new AA(100);
+ a_zero[100] = new AA(0);
+ aa_init[0, 99, 1] = new AA(100);
+ aa_zero[0, 99, 1] = new AA(0);
+ _init = new AA(100);
+ _zero = new AA(0);
+ BB.f_init = new AA(100);
+ BB.f_zero = new AA(0);
+ }
+}
+
+internal struct BB
+{
+ public static AA f_init, f_zero;
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_short_1_d.csproj b/tests/src/JIT/Methodical/explicit/coverage/seq_short_1_d.csproj
new file mode 100644
index 0000000000..8881d50e33
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_short_1_d.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="seq_short_1.cs" />
+ <Compile Include="body_short.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_short_1_r.csproj b/tests/src/JIT/Methodical/explicit/coverage/seq_short_1_r.csproj
new file mode 100644
index 0000000000..8881d50e33
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_short_1_r.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="seq_short_1.cs" />
+ <Compile Include="body_short.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_val_1.cs b/tests/src/JIT/Methodical/explicit/coverage/seq_val_1.cs
new file mode 100644
index 0000000000..d378b36326
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_val_1.cs
@@ -0,0 +1,75 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+using System.Runtime.InteropServices;
+
+internal struct QQ
+{
+ public int val;
+ public QQ(int vv) { val = vv; }
+ public int ret_code() { return 100; }
+};
+
+[StructLayout(LayoutKind.Sequential)]
+internal struct AA
+{
+ public byte tmp1;
+
+
+ public QQ q; //this field is the testing subject
+
+ public byte tmp2;
+
+ public AA(int qq)
+ {
+ tmp1 = 106;
+ tmp2 = 107;
+ q = new QQ(qq);
+ }
+
+ public static AA[] a_init = new AA[101];
+ public static AA[] a_zero = new AA[101];
+ public static AA[,,] aa_init = new AA[1, 101, 2];
+ public static AA[,,] aa_zero = new AA[1, 101, 2];
+ public static object b_init = new AA(100);
+ public static AA _init, _zero;
+
+ public static QQ call_target(QQ arg) { return arg; }
+ public static QQ call_target_ref(ref QQ arg) { return arg; }
+
+ public void verify()
+ {
+ if (tmp1 != 106) throw new Exception("tmp1 corrupted");
+ if (tmp2 != 107) throw new Exception("tmp2 corrupted");
+ }
+
+ public static void verify_all()
+ {
+ a_init[100].verify();
+ a_zero[100].verify();
+ aa_init[0, 99, 1].verify();
+ aa_zero[0, 99, 1].verify();
+ _init.verify();
+ _zero.verify();
+ BB.f_init.verify();
+ BB.f_zero.verify();
+ }
+
+ public static void reset()
+ {
+ a_init[100] = new AA(100);
+ a_zero[100] = new AA(0);
+ aa_init[0, 99, 1] = new AA(100);
+ aa_zero[0, 99, 1] = new AA(0);
+ _init = new AA(100);
+ _zero = new AA(0);
+ BB.f_init = new AA(100);
+ BB.f_zero = new AA(0);
+ }
+}
+
+internal struct BB
+{
+ public static AA f_init, f_zero;
+}
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_val_1_d.csproj b/tests/src/JIT/Methodical/explicit/coverage/seq_val_1_d.csproj
new file mode 100644
index 0000000000..c628836b12
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_val_1_d.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="seq_val_1.cs" />
+ <Compile Include="body_val.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Methodical/explicit/coverage/seq_val_1_r.csproj b/tests/src/JIT/Methodical/explicit/coverage/seq_val_1_r.csproj
new file mode 100644
index 0000000000..c628836b12
--- /dev/null
+++ b/tests/src/JIT/Methodical/explicit/coverage/seq_val_1_r.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <RestorePackages>false</RestorePackages>
+ <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="seq_val_1.cs" />
+ <Compile Include="body_val.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>