summaryrefslogtreecommitdiff
path: root/tests/src/JIT/jit64/regress/vsw/471729/test.cs
diff options
context:
space:
mode:
authorPat Gavlin <pagavlin@microsoft.com>2015-05-26 17:41:38 -0700
committerPat Gavlin <pagavlin@microsoft.com>2015-05-26 17:41:38 -0700
commitb1d65ae5f855952aab37c39923ca5d5138ea09db (patch)
tree9ad2c1ff00ccb099785c63920d2ee386dddd77d6 /tests/src/JIT/jit64/regress/vsw/471729/test.cs
parent4d931ce9e79349733bb74389089b47d600a52fc3 (diff)
downloadcoreclr-b1d65ae5f855952aab37c39923ca5d5138ea09db.tar.gz
coreclr-b1d65ae5f855952aab37c39923ca5d5138ea09db.tar.bz2
coreclr-b1d65ae5f855952aab37c39923ca5d5138ea09db.zip
Import JIT tests.
This imports the remainder of the tests under JIT/jit64 that are able to target CoreCLR.
Diffstat (limited to 'tests/src/JIT/jit64/regress/vsw/471729/test.cs')
-rw-r--r--tests/src/JIT/jit64/regress/vsw/471729/test.cs50
1 files changed, 50 insertions, 0 deletions
diff --git a/tests/src/JIT/jit64/regress/vsw/471729/test.cs b/tests/src/JIT/jit64/regress/vsw/471729/test.cs
new file mode 100644
index 0000000000..4585e760cf
--- /dev/null
+++ b/tests/src/JIT/jit64/regress/vsw/471729/test.cs
@@ -0,0 +1,50 @@
+// 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 static class Repro
+{
+ private struct S
+ {
+ public bool b;
+ public string s;
+ }
+
+ private static S ReturnsS()
+ {
+ S s = new S();
+ s.b = true;
+ s.s = "S";
+ Console.WriteLine(s.s);
+ return s;
+ }
+
+ private static void Test(bool f)
+ {
+ if (f)
+ {
+ throw new Exception(ReturnsS().s, new Exception(ReturnsS().s));
+ }
+ else
+ {
+ Console.WriteLine("blah");
+ }
+ }
+
+ private static int Main()
+ {
+ int rc = 1;
+ try
+ {
+ Test(true);
+ Test(false);
+ }
+ catch
+ {
+ rc = 100;
+ }
+
+ return rc;
+ }
+}