summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCarol Eidt <carol.eidt@microsoft.com>2018-12-18 11:51:49 -0800
committerGitHub <noreply@github.com>2018-12-18 11:51:49 -0800
commit12a8870119b3e8023d68868792b29c28991168b3 (patch)
tree2c25234db16a911fe1b6a74688fa267ebba65839 /tests
parent05d3e8eac6cfd340424efb8f906b8cdb8e8a6bfe (diff)
parent4c428afcde2b9b16f202e864d3ac863ede3dff8f (diff)
downloadcoreclr-12a8870119b3e8023d68868792b29c28991168b3.tar.gz
coreclr-12a8870119b3e8023d68868792b29c28991168b3.tar.bz2
coreclr-12a8870119b3e8023d68868792b29c28991168b3.zip
Merge pull request #21567 from CarolEidt/Issue20657
Test for #20657 SIMD byref bug
Diffstat (limited to 'tests')
-rw-r--r--tests/src/JIT/Regression/JitBlue/GitHub_20657/GitHub_20657.cs34
-rw-r--r--tests/src/JIT/Regression/JitBlue/GitHub_20657/GitHub_20657.csproj34
2 files changed, 68 insertions, 0 deletions
diff --git a/tests/src/JIT/Regression/JitBlue/GitHub_20657/GitHub_20657.cs b/tests/src/JIT/Regression/JitBlue/GitHub_20657/GitHub_20657.cs
new file mode 100644
index 0000000000..b301cfd045
--- /dev/null
+++ b/tests/src/JIT/Regression/JitBlue/GitHub_20657/GitHub_20657.cs
@@ -0,0 +1,34 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System;
+using System.Numerics;
+
+// GitHub 20657:
+
+namespace GitHub_20657
+{
+ class Program
+ {
+ static int Main(string[] args)
+ {
+ var v1 = new Vector4();
+ var v2 = Oops(v1);
+ if ((v2.X != 0.0) || (v2.Y != 0.0) || (v2.Z != 0.0) || (v2.W != 1.0))
+ {
+ return -1;
+ }
+ return 100;
+ }
+
+ private static readonly Vector4 Noo = new Vector4();
+
+ public static Vector4 Oops(Vector4 v)
+ {
+ v.W = 1f;
+
+ return v + Noo;
+ }
+ }
+}
diff --git a/tests/src/JIT/Regression/JitBlue/GitHub_20657/GitHub_20657.csproj b/tests/src/JIT/Regression/JitBlue/GitHub_20657/GitHub_20657.csproj
new file mode 100644
index 0000000000..e191e01217
--- /dev/null
+++ b/tests/src/JIT/Regression/JitBlue/GitHub_20657/GitHub_20657.csproj
@@ -0,0 +1,34 @@
+<?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>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ </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>
+ <DebugType>None</DebugType>
+ <Optimize>True</Optimize>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="$(MSBuildProjectName).cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' "></PropertyGroup>
+</Project>