summaryrefslogtreecommitdiff
path: root/tests/src/JIT/Regression/Dev11
diff options
context:
space:
mode:
authorBengu Li <beli@microsoft.com>2015-06-03 11:42:28 -0700
committerBengu Li <beli@microsoft.com>2015-06-03 11:42:28 -0700
commit54330bb0514211bd7b60162cb1fc8d9dd5835820 (patch)
tree621806132148643f4ce72d6b178767f7636ba15f /tests/src/JIT/Regression/Dev11
parent0c7175bdbacde6b2b22c7bd082fa46fa7589ee37 (diff)
downloadcoreclr-54330bb0514211bd7b60162cb1fc8d9dd5835820.tar.gz
coreclr-54330bb0514211bd7b60162cb1fc8d9dd5835820.tar.bz2
coreclr-54330bb0514211bd7b60162cb1fc8d9dd5835820.zip
Add multiple smaller test directories under JIT/Regression
Add all other test directories under JIT/Regression except for CLR-x86-JIT which is a big one. Related proj, config files added. AllTestProjects.sln is updated. Passed build, buildtest, runtest.
Diffstat (limited to 'tests/src/JIT/Regression/Dev11')
-rw-r--r--tests/src/JIT/Regression/Dev11/Dev11_457559/Dev11_457559.cs39
-rw-r--r--tests/src/JIT/Regression/Dev11/Dev11_457559/Dev11_457559.csproj19
-rw-r--r--tests/src/JIT/Regression/Dev11/Dev11_457559/app.config27
-rw-r--r--tests/src/JIT/Regression/Dev11/Dev11_457559/cs_template.proj42
-rw-r--r--tests/src/JIT/Regression/Dev11/Dev11_457559/packages.config8
-rw-r--r--tests/src/JIT/Regression/Dev11/Dev11_5437/Dev11_5437.cs34
-rw-r--r--tests/src/JIT/Regression/Dev11/Dev11_5437/Dev11_5437.csproj19
-rw-r--r--tests/src/JIT/Regression/Dev11/Dev11_5437/app.config27
-rw-r--r--tests/src/JIT/Regression/Dev11/Dev11_5437/cs_template.proj42
-rw-r--r--tests/src/JIT/Regression/Dev11/Dev11_5437/packages.config8
-rw-r--r--tests/src/JIT/Regression/Dev11/Dev11_617302/Dev11_617302.cs77
-rw-r--r--tests/src/JIT/Regression/Dev11/Dev11_617302/Dev11_617302.csproj19
-rw-r--r--tests/src/JIT/Regression/Dev11/Dev11_617302/app.config27
-rw-r--r--tests/src/JIT/Regression/Dev11/Dev11_617302/cs_template.proj42
-rw-r--r--tests/src/JIT/Regression/Dev11/Dev11_617302/packages.config8
-rw-r--r--tests/src/JIT/Regression/Dev11/Dev11_646049/Dev11_646049.cs31
-rw-r--r--tests/src/JIT/Regression/Dev11/Dev11_646049/Dev11_646049.csproj19
-rw-r--r--tests/src/JIT/Regression/Dev11/Dev11_646049/app.config27
-rw-r--r--tests/src/JIT/Regression/Dev11/Dev11_646049/cs_template.proj42
-rw-r--r--tests/src/JIT/Regression/Dev11/Dev11_646049/packages.config8
-rw-r--r--tests/src/JIT/Regression/Dev11/DevDiv2_10623/DevDiv2_10623.cs19
-rw-r--r--tests/src/JIT/Regression/Dev11/DevDiv2_10623/DevDiv2_10623.csproj19
-rw-r--r--tests/src/JIT/Regression/Dev11/DevDiv2_10623/app.config27
-rw-r--r--tests/src/JIT/Regression/Dev11/DevDiv2_10623/cs_template.proj42
-rw-r--r--tests/src/JIT/Regression/Dev11/DevDiv2_10623/packages.config8
-rw-r--r--tests/src/JIT/Regression/Dev11/DevDiv2_8863/DevDiv2_8863.cs80
-rw-r--r--tests/src/JIT/Regression/Dev11/DevDiv2_8863/DevDiv2_8863.csproj19
-rw-r--r--tests/src/JIT/Regression/Dev11/DevDiv2_8863/app.config27
-rw-r--r--tests/src/JIT/Regression/Dev11/DevDiv2_8863/cs_template.proj42
-rw-r--r--tests/src/JIT/Regression/Dev11/DevDiv2_8863/packages.config8
-rw-r--r--tests/src/JIT/Regression/Dev11/dev10_94677/app.config27
-rw-r--r--tests/src/JIT/Regression/Dev11/dev10_94677/cs_template.proj42
-rw-r--r--tests/src/JIT/Regression/Dev11/dev10_94677/dev10_94677.csproj19
-rw-r--r--tests/src/JIT/Regression/Dev11/dev10_94677/loopvt.cs102
-rw-r--r--tests/src/JIT/Regression/Dev11/dev10_94677/packages.config8
-rw-r--r--tests/src/JIT/Regression/Dev11/dev11_13912/app.config27
-rw-r--r--tests/src/JIT/Regression/Dev11/dev11_13912/cs_template.proj42
-rw-r--r--tests/src/JIT/Regression/Dev11/dev11_13912/dev11_13912.cs46
-rw-r--r--tests/src/JIT/Regression/Dev11/dev11_13912/dev11_13912.csproj19
-rw-r--r--tests/src/JIT/Regression/Dev11/dev11_13912/packages.config8
-rw-r--r--tests/src/JIT/Regression/Dev11/dev11_165544/app.config27
-rw-r--r--tests/src/JIT/Regression/Dev11/dev11_165544/cs_template.proj42
-rw-r--r--tests/src/JIT/Regression/Dev11/dev11_165544/dev11_165544.csproj19
-rw-r--r--tests/src/JIT/Regression/Dev11/dev11_165544/packages.config8
-rw-r--r--tests/src/JIT/Regression/Dev11/dev11_165544/seqpts.cs51
45 files changed, 1343 insertions, 0 deletions
diff --git a/tests/src/JIT/Regression/Dev11/Dev11_457559/Dev11_457559.cs b/tests/src/JIT/Regression/Dev11/Dev11_457559/Dev11_457559.cs
new file mode 100644
index 0000000000..1083c3c7ac
--- /dev/null
+++ b/tests/src/JIT/Regression/Dev11/Dev11_457559/Dev11_457559.cs
@@ -0,0 +1,39 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+using System;
+
+/// <summary>
+/// InvalidCastException is thrown when 'ngen /profile' image doesn't restore System.Enum TypeRef
+/// This is a bug in JIT-EE interface. The fix was to add call to
+/// m_pOverride->classMustBeLoadedBeforeCodelsRun in CEEInfo::getUnBoxHelper
+/// </summary>
+public class Test
+{
+ public static int Main()
+ {
+ if (RunTest(1))
+ {
+ Console.WriteLine("Pass");
+ return 100;
+ }
+ Console.WriteLine("Fail");
+ return 101;
+ }
+ public static bool RunTest(object o)
+ {
+ try
+ {
+ bool b = ((MyEnum)o) == MyEnum.Value0;
+ Console.WriteLine("{0}", b);
+ }
+ catch (Exception e)
+ {
+ Console.WriteLine("Unexpected exception thrown: " + e);
+ return false;
+ }
+ return true;
+ }
+}
+public enum MyEnum { Value0 = 0 } \ No newline at end of file
diff --git a/tests/src/JIT/Regression/Dev11/Dev11_457559/Dev11_457559.csproj b/tests/src/JIT/Regression/Dev11/Dev11_457559/Dev11_457559.csproj
new file mode 100644
index 0000000000..33b2928ebc
--- /dev/null
+++ b/tests/src/JIT/Regression/Dev11/Dev11_457559/Dev11_457559.csproj
@@ -0,0 +1,19 @@
+<?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" />
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
+ </PropertyGroup>
+ <Target Name="Build">
+ <ItemGroup>
+ <AllSourceFiles Include="$(MSBuildProjectDirectory)\*.cs" />
+ </ItemGroup>
+ <PropertyGroup>
+ <GenerateRunScript>false</GenerateRunScript>
+ </PropertyGroup>
+ <MSBuild Projects="cs_template.proj" Properties="AssemblyName1=%(AllSourceFiles.FileName);AllowUnsafeBlocks=True;IntermediateOutputPath=$(IntermediateOutputPath)\%(AllSourceFiles.FileName)\" />
+ </Target>
+</Project>
diff --git a/tests/src/JIT/Regression/Dev11/Dev11_457559/app.config b/tests/src/JIT/Regression/Dev11/Dev11_457559/app.config
new file mode 100644
index 0000000000..62803f5972
--- /dev/null
+++ b/tests/src/JIT/Regression/Dev11/Dev11_457559/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/Regression/Dev11/Dev11_457559/cs_template.proj b/tests/src/JIT/Regression/Dev11/Dev11_457559/cs_template.proj
new file mode 100644
index 0000000000..adc2f21e14
--- /dev/null
+++ b/tests/src/JIT/Regression/Dev11/Dev11_457559/cs_template.proj
@@ -0,0 +1,42 @@
+<?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>$(AssemblyName1)</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>true</RestorePackages>
+ <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>
+ <ItemGroup>
+ <Compile Include="$(AssemblyName1).cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="packages.config" />
+ <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/Regression/Dev11/Dev11_457559/packages.config b/tests/src/JIT/Regression/Dev11/Dev11_457559/packages.config
new file mode 100644
index 0000000000..8f8ccd47d6
--- /dev/null
+++ b/tests/src/JIT/Regression/Dev11/Dev11_457559/packages.config
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="System.Console" version="4.0.0-beta-22405" />
+ <package id="System.Runtime" version="4.0.20-beta-22405" />
+ <package id="System.Runtime.Extensions" version="4.0.10-beta-22412" />
+ <package id="System.Threading" version="4.0.0-beta-22412" />
+ <package id="System.Threading.Thread" version="4.0.0-beta-22512" />
+</packages>
diff --git a/tests/src/JIT/Regression/Dev11/Dev11_5437/Dev11_5437.cs b/tests/src/JIT/Regression/Dev11/Dev11_5437/Dev11_5437.cs
new file mode 100644
index 0000000000..6aea3f67fa
--- /dev/null
+++ b/tests/src/JIT/Regression/Dev11/Dev11_5437/Dev11_5437.cs
@@ -0,0 +1,34 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+using System;
+
+class Program
+{
+ static void f(int c, int d, int e)
+ {
+ Console.WriteLine("c={0}, d={1}, e={2}", c, d, e);
+ if (c + d != 4)
+ {
+ Console.WriteLine("FAILED: c + d != 4"); //We are hitting the bug so bailing out
+ throw new Exception("FAILED");
+ }
+ }
+ static int Main()
+ {
+ int d = 0;
+ int i = 3;
+ for (int e = 0; e < 2; e++)
+ {
+ while (true)
+ {
+ int c = 3 - d++;
+ f(c, d, e); // c == 3-d+1 !
+ if (--i < 1) break;
+ }
+ }
+ Console.WriteLine("PASSED");
+ return 100; //Didn't hit the bug so return success
+ }
+} \ No newline at end of file
diff --git a/tests/src/JIT/Regression/Dev11/Dev11_5437/Dev11_5437.csproj b/tests/src/JIT/Regression/Dev11/Dev11_5437/Dev11_5437.csproj
new file mode 100644
index 0000000000..33b2928ebc
--- /dev/null
+++ b/tests/src/JIT/Regression/Dev11/Dev11_5437/Dev11_5437.csproj
@@ -0,0 +1,19 @@
+<?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" />
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
+ </PropertyGroup>
+ <Target Name="Build">
+ <ItemGroup>
+ <AllSourceFiles Include="$(MSBuildProjectDirectory)\*.cs" />
+ </ItemGroup>
+ <PropertyGroup>
+ <GenerateRunScript>false</GenerateRunScript>
+ </PropertyGroup>
+ <MSBuild Projects="cs_template.proj" Properties="AssemblyName1=%(AllSourceFiles.FileName);AllowUnsafeBlocks=True;IntermediateOutputPath=$(IntermediateOutputPath)\%(AllSourceFiles.FileName)\" />
+ </Target>
+</Project>
diff --git a/tests/src/JIT/Regression/Dev11/Dev11_5437/app.config b/tests/src/JIT/Regression/Dev11/Dev11_5437/app.config
new file mode 100644
index 0000000000..62803f5972
--- /dev/null
+++ b/tests/src/JIT/Regression/Dev11/Dev11_5437/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/Regression/Dev11/Dev11_5437/cs_template.proj b/tests/src/JIT/Regression/Dev11/Dev11_5437/cs_template.proj
new file mode 100644
index 0000000000..adc2f21e14
--- /dev/null
+++ b/tests/src/JIT/Regression/Dev11/Dev11_5437/cs_template.proj
@@ -0,0 +1,42 @@
+<?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>$(AssemblyName1)</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>true</RestorePackages>
+ <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>
+ <ItemGroup>
+ <Compile Include="$(AssemblyName1).cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="packages.config" />
+ <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/Regression/Dev11/Dev11_5437/packages.config b/tests/src/JIT/Regression/Dev11/Dev11_5437/packages.config
new file mode 100644
index 0000000000..8f8ccd47d6
--- /dev/null
+++ b/tests/src/JIT/Regression/Dev11/Dev11_5437/packages.config
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="System.Console" version="4.0.0-beta-22405" />
+ <package id="System.Runtime" version="4.0.20-beta-22405" />
+ <package id="System.Runtime.Extensions" version="4.0.10-beta-22412" />
+ <package id="System.Threading" version="4.0.0-beta-22412" />
+ <package id="System.Threading.Thread" version="4.0.0-beta-22512" />
+</packages>
diff --git a/tests/src/JIT/Regression/Dev11/Dev11_617302/Dev11_617302.cs b/tests/src/JIT/Regression/Dev11/Dev11_617302/Dev11_617302.cs
new file mode 100644
index 0000000000..0c6e8f8d7c
--- /dev/null
+++ b/tests/src/JIT/Regression/Dev11/Dev11_617302/Dev11_617302.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.CompilerServices;
+
+namespace ConsoleApplication1
+{
+ class Program
+ {
+ /// <summary>
+ /// AV when switch optimized away in x64. Should be somewhat rare but we optimize because all the switch cases result in the same assignment
+ /// </summary>
+ /// <param name="args"></param>
+ /// <returns></returns>
+ static int Main(string[] args)
+ {
+ try
+ {
+ ProductPatchLevel.GetPatchLevel(Product.Client);
+ Console.WriteLine("Pass");
+ return 100;
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine(ex);
+ Console.WriteLine("Fail");
+ return -1;
+ }
+ }
+ }
+
+ public enum Product
+ {
+ Client,
+ SDK,
+ SAG,
+ }
+
+ public static class ProductPatchLevel
+ {
+ private const int ClientLevel = 0;
+ private const int SDKLevel = 0;
+ private const int SAGLevel = 0;
+
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ public static int GetPatchLevel(Product p)
+ {
+ int patchLevel = 0;
+ switch (p)
+ {
+ case Product.Client:
+ {
+ patchLevel = ClientLevel;
+ break;
+ }
+
+ case Product.SDK:
+ {
+ patchLevel = SDKLevel;
+ break;
+ }
+
+ case Product.SAG:
+ {
+ patchLevel = SAGLevel;
+ break;
+ }
+
+ }
+
+ return patchLevel;
+ }
+ }
+
+}
diff --git a/tests/src/JIT/Regression/Dev11/Dev11_617302/Dev11_617302.csproj b/tests/src/JIT/Regression/Dev11/Dev11_617302/Dev11_617302.csproj
new file mode 100644
index 0000000000..33b2928ebc
--- /dev/null
+++ b/tests/src/JIT/Regression/Dev11/Dev11_617302/Dev11_617302.csproj
@@ -0,0 +1,19 @@
+<?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" />
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
+ </PropertyGroup>
+ <Target Name="Build">
+ <ItemGroup>
+ <AllSourceFiles Include="$(MSBuildProjectDirectory)\*.cs" />
+ </ItemGroup>
+ <PropertyGroup>
+ <GenerateRunScript>false</GenerateRunScript>
+ </PropertyGroup>
+ <MSBuild Projects="cs_template.proj" Properties="AssemblyName1=%(AllSourceFiles.FileName);AllowUnsafeBlocks=True;IntermediateOutputPath=$(IntermediateOutputPath)\%(AllSourceFiles.FileName)\" />
+ </Target>
+</Project>
diff --git a/tests/src/JIT/Regression/Dev11/Dev11_617302/app.config b/tests/src/JIT/Regression/Dev11/Dev11_617302/app.config
new file mode 100644
index 0000000000..62803f5972
--- /dev/null
+++ b/tests/src/JIT/Regression/Dev11/Dev11_617302/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/Regression/Dev11/Dev11_617302/cs_template.proj b/tests/src/JIT/Regression/Dev11/Dev11_617302/cs_template.proj
new file mode 100644
index 0000000000..adc2f21e14
--- /dev/null
+++ b/tests/src/JIT/Regression/Dev11/Dev11_617302/cs_template.proj
@@ -0,0 +1,42 @@
+<?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>$(AssemblyName1)</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>true</RestorePackages>
+ <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>
+ <ItemGroup>
+ <Compile Include="$(AssemblyName1).cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="packages.config" />
+ <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/Regression/Dev11/Dev11_617302/packages.config b/tests/src/JIT/Regression/Dev11/Dev11_617302/packages.config
new file mode 100644
index 0000000000..8f8ccd47d6
--- /dev/null
+++ b/tests/src/JIT/Regression/Dev11/Dev11_617302/packages.config
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="System.Console" version="4.0.0-beta-22405" />
+ <package id="System.Runtime" version="4.0.20-beta-22405" />
+ <package id="System.Runtime.Extensions" version="4.0.10-beta-22412" />
+ <package id="System.Threading" version="4.0.0-beta-22412" />
+ <package id="System.Threading.Thread" version="4.0.0-beta-22512" />
+</packages>
diff --git a/tests/src/JIT/Regression/Dev11/Dev11_646049/Dev11_646049.cs b/tests/src/JIT/Regression/Dev11/Dev11_646049/Dev11_646049.cs
new file mode 100644
index 0000000000..b7bfe50bb9
--- /dev/null
+++ b/tests/src/JIT/Regression/Dev11/Dev11_646049/Dev11_646049.cs
@@ -0,0 +1,31 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+using System;
+
+class Test
+{
+ /// <summary>
+ /// Another 64 bit optimization issue where we dont do the coversion correctly. The following output is seen when this program fails
+ /// Error! expected, -4.54403989493052E+18, returned: -66876.654654
+ /// </summary>
+ /// <param name="args"></param>
+ /// <returns></returns>
+ static int Main(string[] args)
+ {
+ double expected = -4.54403989493052E+18;
+ double value = -66876.654654;
+ double result = (double)BitConverter.DoubleToInt64Bits(value);
+ if (result > -4.5E18)
+ {
+ Console.WriteLine("Error! expected, {0}, returned: {1}", expected, result);
+ return -1;
+ }
+ else
+ {
+ Console.WriteLine("Pass");
+ return 100;
+ }
+ }
+}
diff --git a/tests/src/JIT/Regression/Dev11/Dev11_646049/Dev11_646049.csproj b/tests/src/JIT/Regression/Dev11/Dev11_646049/Dev11_646049.csproj
new file mode 100644
index 0000000000..33b2928ebc
--- /dev/null
+++ b/tests/src/JIT/Regression/Dev11/Dev11_646049/Dev11_646049.csproj
@@ -0,0 +1,19 @@
+<?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" />
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
+ </PropertyGroup>
+ <Target Name="Build">
+ <ItemGroup>
+ <AllSourceFiles Include="$(MSBuildProjectDirectory)\*.cs" />
+ </ItemGroup>
+ <PropertyGroup>
+ <GenerateRunScript>false</GenerateRunScript>
+ </PropertyGroup>
+ <MSBuild Projects="cs_template.proj" Properties="AssemblyName1=%(AllSourceFiles.FileName);AllowUnsafeBlocks=True;IntermediateOutputPath=$(IntermediateOutputPath)\%(AllSourceFiles.FileName)\" />
+ </Target>
+</Project>
diff --git a/tests/src/JIT/Regression/Dev11/Dev11_646049/app.config b/tests/src/JIT/Regression/Dev11/Dev11_646049/app.config
new file mode 100644
index 0000000000..62803f5972
--- /dev/null
+++ b/tests/src/JIT/Regression/Dev11/Dev11_646049/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/Regression/Dev11/Dev11_646049/cs_template.proj b/tests/src/JIT/Regression/Dev11/Dev11_646049/cs_template.proj
new file mode 100644
index 0000000000..adc2f21e14
--- /dev/null
+++ b/tests/src/JIT/Regression/Dev11/Dev11_646049/cs_template.proj
@@ -0,0 +1,42 @@
+<?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>$(AssemblyName1)</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>true</RestorePackages>
+ <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>
+ <ItemGroup>
+ <Compile Include="$(AssemblyName1).cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="packages.config" />
+ <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/Regression/Dev11/Dev11_646049/packages.config b/tests/src/JIT/Regression/Dev11/Dev11_646049/packages.config
new file mode 100644
index 0000000000..8f8ccd47d6
--- /dev/null
+++ b/tests/src/JIT/Regression/Dev11/Dev11_646049/packages.config
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="System.Console" version="4.0.0-beta-22405" />
+ <package id="System.Runtime" version="4.0.20-beta-22405" />
+ <package id="System.Runtime.Extensions" version="4.0.10-beta-22412" />
+ <package id="System.Threading" version="4.0.0-beta-22412" />
+ <package id="System.Threading.Thread" version="4.0.0-beta-22512" />
+</packages>
diff --git a/tests/src/JIT/Regression/Dev11/DevDiv2_10623/DevDiv2_10623.cs b/tests/src/JIT/Regression/Dev11/DevDiv2_10623/DevDiv2_10623.cs
new file mode 100644
index 0000000000..079421196d
--- /dev/null
+++ b/tests/src/JIT/Regression/Dev11/DevDiv2_10623/DevDiv2_10623.cs
@@ -0,0 +1,19 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+using System;
+public class Program
+{
+ public static bool IsGuid(object item)
+ {
+ return item is Guid;
+ }
+ public static int Main()
+ {
+ if (IsGuid(Guid.NewGuid()))
+ return 100;
+ else
+ return 99;
+ }
+}
diff --git a/tests/src/JIT/Regression/Dev11/DevDiv2_10623/DevDiv2_10623.csproj b/tests/src/JIT/Regression/Dev11/DevDiv2_10623/DevDiv2_10623.csproj
new file mode 100644
index 0000000000..33b2928ebc
--- /dev/null
+++ b/tests/src/JIT/Regression/Dev11/DevDiv2_10623/DevDiv2_10623.csproj
@@ -0,0 +1,19 @@
+<?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" />
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
+ </PropertyGroup>
+ <Target Name="Build">
+ <ItemGroup>
+ <AllSourceFiles Include="$(MSBuildProjectDirectory)\*.cs" />
+ </ItemGroup>
+ <PropertyGroup>
+ <GenerateRunScript>false</GenerateRunScript>
+ </PropertyGroup>
+ <MSBuild Projects="cs_template.proj" Properties="AssemblyName1=%(AllSourceFiles.FileName);AllowUnsafeBlocks=True;IntermediateOutputPath=$(IntermediateOutputPath)\%(AllSourceFiles.FileName)\" />
+ </Target>
+</Project>
diff --git a/tests/src/JIT/Regression/Dev11/DevDiv2_10623/app.config b/tests/src/JIT/Regression/Dev11/DevDiv2_10623/app.config
new file mode 100644
index 0000000000..62803f5972
--- /dev/null
+++ b/tests/src/JIT/Regression/Dev11/DevDiv2_10623/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/Regression/Dev11/DevDiv2_10623/cs_template.proj b/tests/src/JIT/Regression/Dev11/DevDiv2_10623/cs_template.proj
new file mode 100644
index 0000000000..adc2f21e14
--- /dev/null
+++ b/tests/src/JIT/Regression/Dev11/DevDiv2_10623/cs_template.proj
@@ -0,0 +1,42 @@
+<?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>$(AssemblyName1)</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>true</RestorePackages>
+ <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>
+ <ItemGroup>
+ <Compile Include="$(AssemblyName1).cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="packages.config" />
+ <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/Regression/Dev11/DevDiv2_10623/packages.config b/tests/src/JIT/Regression/Dev11/DevDiv2_10623/packages.config
new file mode 100644
index 0000000000..8f8ccd47d6
--- /dev/null
+++ b/tests/src/JIT/Regression/Dev11/DevDiv2_10623/packages.config
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="System.Console" version="4.0.0-beta-22405" />
+ <package id="System.Runtime" version="4.0.20-beta-22405" />
+ <package id="System.Runtime.Extensions" version="4.0.10-beta-22412" />
+ <package id="System.Threading" version="4.0.0-beta-22412" />
+ <package id="System.Threading.Thread" version="4.0.0-beta-22512" />
+</packages>
diff --git a/tests/src/JIT/Regression/Dev11/DevDiv2_8863/DevDiv2_8863.cs b/tests/src/JIT/Regression/Dev11/DevDiv2_8863/DevDiv2_8863.cs
new file mode 100644
index 0000000000..c54435475b
--- /dev/null
+++ b/tests/src/JIT/Regression/Dev11/DevDiv2_8863/DevDiv2_8863.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;
+
+public class Base
+{
+ public virtual Base Get()
+ {
+ return null;
+ }
+}
+
+public class Derived : Base
+{
+ public int i;
+ public int j;
+ public int k;
+}
+
+public class MyDerived : Derived
+{
+ public override Base Get()
+ {
+ return new MyBase();
+ }
+}
+
+public class MyBase : Base
+{
+ string foo = "foo";
+ int track = 0x44444444;
+
+ ~MyBase()
+ {
+ Console.WriteLine("\tDestructor. Foo: 0x{0:X8}", foo.Length);
+ }
+}
+
+public class Program
+{
+ static void x64_JIT_Bug(Derived d)
+ {
+ Base b = d;
+ loop:
+ if (b != null)
+ {
+ if (b is Derived)
+ {
+ Oops((Derived)b);
+ }
+ b = b.Get();
+ goto loop;
+ }
+ }
+
+ static void Oops(Derived d)
+ {
+ Console.WriteLine(d);
+ Console.WriteLine(d.i);
+ Console.WriteLine(d.j);
+ Console.WriteLine(d.k);
+ d.i = 0x77777777;
+ d.j = 0x77777777;
+ }
+
+ static int Main()
+ {
+ /* This issue is caused by CSE and trying to pull a typecheck out of a loop.
+ * We used to do this incorrectly and this could allow a type to call methods
+ * from it's "cousin" types...
+ *
+ * This example will AV...
+ * */
+ x64_JIT_Bug(new MyDerived());
+ return 100; // Well, we made it here... should be good.
+ }
+}
+
diff --git a/tests/src/JIT/Regression/Dev11/DevDiv2_8863/DevDiv2_8863.csproj b/tests/src/JIT/Regression/Dev11/DevDiv2_8863/DevDiv2_8863.csproj
new file mode 100644
index 0000000000..33b2928ebc
--- /dev/null
+++ b/tests/src/JIT/Regression/Dev11/DevDiv2_8863/DevDiv2_8863.csproj
@@ -0,0 +1,19 @@
+<?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" />
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
+ </PropertyGroup>
+ <Target Name="Build">
+ <ItemGroup>
+ <AllSourceFiles Include="$(MSBuildProjectDirectory)\*.cs" />
+ </ItemGroup>
+ <PropertyGroup>
+ <GenerateRunScript>false</GenerateRunScript>
+ </PropertyGroup>
+ <MSBuild Projects="cs_template.proj" Properties="AssemblyName1=%(AllSourceFiles.FileName);AllowUnsafeBlocks=True;IntermediateOutputPath=$(IntermediateOutputPath)\%(AllSourceFiles.FileName)\" />
+ </Target>
+</Project>
diff --git a/tests/src/JIT/Regression/Dev11/DevDiv2_8863/app.config b/tests/src/JIT/Regression/Dev11/DevDiv2_8863/app.config
new file mode 100644
index 0000000000..62803f5972
--- /dev/null
+++ b/tests/src/JIT/Regression/Dev11/DevDiv2_8863/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/Regression/Dev11/DevDiv2_8863/cs_template.proj b/tests/src/JIT/Regression/Dev11/DevDiv2_8863/cs_template.proj
new file mode 100644
index 0000000000..adc2f21e14
--- /dev/null
+++ b/tests/src/JIT/Regression/Dev11/DevDiv2_8863/cs_template.proj
@@ -0,0 +1,42 @@
+<?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>$(AssemblyName1)</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>true</RestorePackages>
+ <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>
+ <ItemGroup>
+ <Compile Include="$(AssemblyName1).cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="packages.config" />
+ <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/Regression/Dev11/DevDiv2_8863/packages.config b/tests/src/JIT/Regression/Dev11/DevDiv2_8863/packages.config
new file mode 100644
index 0000000000..8f8ccd47d6
--- /dev/null
+++ b/tests/src/JIT/Regression/Dev11/DevDiv2_8863/packages.config
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="System.Console" version="4.0.0-beta-22405" />
+ <package id="System.Runtime" version="4.0.20-beta-22405" />
+ <package id="System.Runtime.Extensions" version="4.0.10-beta-22412" />
+ <package id="System.Threading" version="4.0.0-beta-22412" />
+ <package id="System.Threading.Thread" version="4.0.0-beta-22512" />
+</packages>
diff --git a/tests/src/JIT/Regression/Dev11/dev10_94677/app.config b/tests/src/JIT/Regression/Dev11/dev10_94677/app.config
new file mode 100644
index 0000000000..62803f5972
--- /dev/null
+++ b/tests/src/JIT/Regression/Dev11/dev10_94677/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/Regression/Dev11/dev10_94677/cs_template.proj b/tests/src/JIT/Regression/Dev11/dev10_94677/cs_template.proj
new file mode 100644
index 0000000000..adc2f21e14
--- /dev/null
+++ b/tests/src/JIT/Regression/Dev11/dev10_94677/cs_template.proj
@@ -0,0 +1,42 @@
+<?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>$(AssemblyName1)</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>true</RestorePackages>
+ <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>
+ <ItemGroup>
+ <Compile Include="$(AssemblyName1).cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="packages.config" />
+ <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/Regression/Dev11/dev10_94677/dev10_94677.csproj b/tests/src/JIT/Regression/Dev11/dev10_94677/dev10_94677.csproj
new file mode 100644
index 0000000000..33b2928ebc
--- /dev/null
+++ b/tests/src/JIT/Regression/Dev11/dev10_94677/dev10_94677.csproj
@@ -0,0 +1,19 @@
+<?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" />
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
+ </PropertyGroup>
+ <Target Name="Build">
+ <ItemGroup>
+ <AllSourceFiles Include="$(MSBuildProjectDirectory)\*.cs" />
+ </ItemGroup>
+ <PropertyGroup>
+ <GenerateRunScript>false</GenerateRunScript>
+ </PropertyGroup>
+ <MSBuild Projects="cs_template.proj" Properties="AssemblyName1=%(AllSourceFiles.FileName);AllowUnsafeBlocks=True;IntermediateOutputPath=$(IntermediateOutputPath)\%(AllSourceFiles.FileName)\" />
+ </Target>
+</Project>
diff --git a/tests/src/JIT/Regression/Dev11/dev10_94677/loopvt.cs b/tests/src/JIT/Regression/Dev11/dev10_94677/loopvt.cs
new file mode 100644
index 0000000000..4fc5c0dd33
--- /dev/null
+++ b/tests/src/JIT/Regression/Dev11/dev10_94677/loopvt.cs
@@ -0,0 +1,102 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+/*
+ * JIT64 bug The bug is triggered by a pattern of loops over arrays of medium sized structs (between 4
+ * and ~32 bytes), but those are not the only cases that might hit it, just the easiest to describe
+ * (and maybe most likely?). In this case the last part of the trigger was that on array was offset
+ * from the other:
+ * batch[i] = keys[batchIndex + i];
+ * OsrApplyReductions and OsrGroupIVsByStride had a very similar loop, but with one notable difference.
+ * The former had a call to OsrRemoveGCCandidates, but the later did not. If OsrRemvoeGCCandidates
+ * walked across a multiply, it would change the stride, which would make a given candidate no longer
+ * fit in the stride group it was placed in. This bug has existed since 2003 when ltaylors first wrote
+ * these routines. I believe the fix is to add the call to OsrGroupIVsByStride so the loops match.
+ */
+
+using System;
+
+struct VT
+{
+ public double vt1;
+ public double vt2;
+ public double vt3;
+
+ public VT(double d1, double d2, double d3)
+ {
+ vt1 = d1; vt2 = d2; vt3 = d3;
+ }
+
+}
+
+
+class DblArray3
+{
+
+ // instance field of valuetype
+ public static void f4(VT[] keys, uint m_ReadMultipleMaxBatchSize)
+ {
+
+ // Create first batch.
+ // Should have incoming m_ReadMultipleMaxBatchSize less than keys.length
+ VT[] batch = keys;
+ if (keys.Length > m_ReadMultipleMaxBatchSize)
+ {
+ batch = new VT[m_ReadMultipleMaxBatchSize];
+ }
+
+ int batchIndex = 0;
+ do
+ {
+ if (batch != keys)
+ {
+ // Multiple batches case.
+
+ // If new batch should be smaller, create a new array.
+ // Otherwise, reuse the old one.
+ if (keys.Length < batchIndex + m_ReadMultipleMaxBatchSize)
+ {
+ batch = new VT[keys.Length - batchIndex];
+ }
+
+ // Copy keys to the batch array.
+ for (int i = 0; i < batch.Length; i++)
+ {
+ batch[i] = keys[batchIndex + i];
+ }
+ }
+
+ // Process the current batch and move to the next one.
+ batchIndex += batch.Length;
+ }
+ while (batchIndex < keys.Length);
+ }
+
+
+
+ public static int Main()
+ {
+ try
+ {
+ VT[] keys = new VT[10];
+ for (uint ii = 0; ii < keys.Length; ii++)
+ keys[ii] = new VT(0xf, 0x4, 0xe);
+ f4(keys, 5);
+ }
+ catch (Exception e)
+ {
+ Console.WriteLine(e.Message);
+ Console.WriteLine("FAILED");
+ Console.WriteLine();
+ Console.WriteLine(@"//
+// The bug is triggered by a pattern of loops over arrays of medium sized structs (between 4 and ~32 bytes), but those are not the only cases that might hit it, just the easiest to describe (and maybe most likely?). In this case the last part of the trigger was that on array was offset from the other:
+// batch[i] = keys[batchIndex + i];"
+ );
+ return -1;
+ }
+ Console.WriteLine("PASSED");
+ return 100;
+ }
+
+}
diff --git a/tests/src/JIT/Regression/Dev11/dev10_94677/packages.config b/tests/src/JIT/Regression/Dev11/dev10_94677/packages.config
new file mode 100644
index 0000000000..8f8ccd47d6
--- /dev/null
+++ b/tests/src/JIT/Regression/Dev11/dev10_94677/packages.config
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="System.Console" version="4.0.0-beta-22405" />
+ <package id="System.Runtime" version="4.0.20-beta-22405" />
+ <package id="System.Runtime.Extensions" version="4.0.10-beta-22412" />
+ <package id="System.Threading" version="4.0.0-beta-22412" />
+ <package id="System.Threading.Thread" version="4.0.0-beta-22512" />
+</packages>
diff --git a/tests/src/JIT/Regression/Dev11/dev11_13912/app.config b/tests/src/JIT/Regression/Dev11/dev11_13912/app.config
new file mode 100644
index 0000000000..62803f5972
--- /dev/null
+++ b/tests/src/JIT/Regression/Dev11/dev11_13912/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/Regression/Dev11/dev11_13912/cs_template.proj b/tests/src/JIT/Regression/Dev11/dev11_13912/cs_template.proj
new file mode 100644
index 0000000000..adc2f21e14
--- /dev/null
+++ b/tests/src/JIT/Regression/Dev11/dev11_13912/cs_template.proj
@@ -0,0 +1,42 @@
+<?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>$(AssemblyName1)</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>true</RestorePackages>
+ <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>
+ <ItemGroup>
+ <Compile Include="$(AssemblyName1).cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="packages.config" />
+ <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/Regression/Dev11/dev11_13912/dev11_13912.cs b/tests/src/JIT/Regression/Dev11/dev11_13912/dev11_13912.cs
new file mode 100644
index 0000000000..24b4fc8692
--- /dev/null
+++ b/tests/src/JIT/Regression/Dev11/dev11_13912/dev11_13912.cs
@@ -0,0 +1,46 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+using System;
+
+public class P
+{
+ public static int Main()
+ {
+ // This bug is caused by a broken flowgraph due to a return from
+ // a try inside a catch block
+
+ TestCatchReturn();
+
+ // Successfully jitted a return from a try inside a catch block
+ return 100;
+ }
+
+ public static void TestCatchReturn()
+ {
+ try
+ {
+ }
+ catch (Exception)
+ {
+ try
+ {
+ try
+ {
+ return;
+ }
+ catch
+ {
+ return;
+ }
+ finally
+ {
+ }
+ }
+ catch (Exception)
+ {
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/src/JIT/Regression/Dev11/dev11_13912/dev11_13912.csproj b/tests/src/JIT/Regression/Dev11/dev11_13912/dev11_13912.csproj
new file mode 100644
index 0000000000..33b2928ebc
--- /dev/null
+++ b/tests/src/JIT/Regression/Dev11/dev11_13912/dev11_13912.csproj
@@ -0,0 +1,19 @@
+<?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" />
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
+ </PropertyGroup>
+ <Target Name="Build">
+ <ItemGroup>
+ <AllSourceFiles Include="$(MSBuildProjectDirectory)\*.cs" />
+ </ItemGroup>
+ <PropertyGroup>
+ <GenerateRunScript>false</GenerateRunScript>
+ </PropertyGroup>
+ <MSBuild Projects="cs_template.proj" Properties="AssemblyName1=%(AllSourceFiles.FileName);AllowUnsafeBlocks=True;IntermediateOutputPath=$(IntermediateOutputPath)\%(AllSourceFiles.FileName)\" />
+ </Target>
+</Project>
diff --git a/tests/src/JIT/Regression/Dev11/dev11_13912/packages.config b/tests/src/JIT/Regression/Dev11/dev11_13912/packages.config
new file mode 100644
index 0000000000..8f8ccd47d6
--- /dev/null
+++ b/tests/src/JIT/Regression/Dev11/dev11_13912/packages.config
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="System.Console" version="4.0.0-beta-22405" />
+ <package id="System.Runtime" version="4.0.20-beta-22405" />
+ <package id="System.Runtime.Extensions" version="4.0.10-beta-22412" />
+ <package id="System.Threading" version="4.0.0-beta-22412" />
+ <package id="System.Threading.Thread" version="4.0.0-beta-22512" />
+</packages>
diff --git a/tests/src/JIT/Regression/Dev11/dev11_165544/app.config b/tests/src/JIT/Regression/Dev11/dev11_165544/app.config
new file mode 100644
index 0000000000..62803f5972
--- /dev/null
+++ b/tests/src/JIT/Regression/Dev11/dev11_165544/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/Regression/Dev11/dev11_165544/cs_template.proj b/tests/src/JIT/Regression/Dev11/dev11_165544/cs_template.proj
new file mode 100644
index 0000000000..adc2f21e14
--- /dev/null
+++ b/tests/src/JIT/Regression/Dev11/dev11_165544/cs_template.proj
@@ -0,0 +1,42 @@
+<?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>$(AssemblyName1)</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>true</RestorePackages>
+ <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>
+ <ItemGroup>
+ <Compile Include="$(AssemblyName1).cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="packages.config" />
+ <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/Regression/Dev11/dev11_165544/dev11_165544.csproj b/tests/src/JIT/Regression/Dev11/dev11_165544/dev11_165544.csproj
new file mode 100644
index 0000000000..33b2928ebc
--- /dev/null
+++ b/tests/src/JIT/Regression/Dev11/dev11_165544/dev11_165544.csproj
@@ -0,0 +1,19 @@
+<?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" />
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
+ </PropertyGroup>
+ <Target Name="Build">
+ <ItemGroup>
+ <AllSourceFiles Include="$(MSBuildProjectDirectory)\*.cs" />
+ </ItemGroup>
+ <PropertyGroup>
+ <GenerateRunScript>false</GenerateRunScript>
+ </PropertyGroup>
+ <MSBuild Projects="cs_template.proj" Properties="AssemblyName1=%(AllSourceFiles.FileName);AllowUnsafeBlocks=True;IntermediateOutputPath=$(IntermediateOutputPath)\%(AllSourceFiles.FileName)\" />
+ </Target>
+</Project>
diff --git a/tests/src/JIT/Regression/Dev11/dev11_165544/packages.config b/tests/src/JIT/Regression/Dev11/dev11_165544/packages.config
new file mode 100644
index 0000000000..8f8ccd47d6
--- /dev/null
+++ b/tests/src/JIT/Regression/Dev11/dev11_165544/packages.config
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="System.Console" version="4.0.0-beta-22405" />
+ <package id="System.Runtime" version="4.0.20-beta-22405" />
+ <package id="System.Runtime.Extensions" version="4.0.10-beta-22412" />
+ <package id="System.Threading" version="4.0.0-beta-22412" />
+ <package id="System.Threading.Thread" version="4.0.0-beta-22512" />
+</packages>
diff --git a/tests/src/JIT/Regression/Dev11/dev11_165544/seqpts.cs b/tests/src/JIT/Regression/Dev11/dev11_165544/seqpts.cs
new file mode 100644
index 0000000000..745e969432
--- /dev/null
+++ b/tests/src/JIT/Regression/Dev11/dev11_165544/seqpts.cs
@@ -0,0 +1,51 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+/*
+ * Ensure that for start of sequence points that are also start of NOGC interrupt regions, an interruptible NOP is placed in front for the sequence point.
+ *
+ * The test does not check for the above in the JIT tree but only functional correctness.
+ */
+// csc /o- /debug+
+using System;
+
+struct BigCopy
+{
+ public long l1, l2, l3;
+ public object gc;
+ public override string ToString()
+ {
+ return string.Format("l1 = {0}, l2 = {1}, l3 = {2}", l1, l2, l3);
+ }
+ public static BigCopy operator +(BigCopy c, long l)
+ {
+ c.l1 += l;
+ c.l2 += l;
+ c.l3 += l;
+ return c;
+ }
+}
+
+static class Repro
+{
+ static int Main(string[] args)
+ {
+ BigCopy b1, b2, b3;
+ b1.gc = "me";
+ b1.l1 = 1;
+ b1.l2 = 2;
+ b1.l3 = 3;
+ b2 = b1;
+ b2 += 3;
+ b3 = b2;
+ b3 += 3;
+ Console.WriteLine("b1 = {0}", b1);
+ Console.WriteLine("b2 = {0}", b2);
+ Console.WriteLine("b3 = {0}", b3);
+ if (b1.l1 == 1 && b1.l2 == 2 && b1.l3 == 3 &&
+ b2.l1 == 4 && b2.l2 == 5 && b2.l3 == 6 &&
+ b3.l1 == 7 && b3.l2 == 8 && b3.l3 == 9) return 100;
+ return 101;
+ }
+}