summaryrefslogtreecommitdiff
path: root/tests/src
diff options
context:
space:
mode:
authorLubomir Litchev <LLITCHEV@users.noreply.github.com>2016-02-29 21:29:51 -0800
committerLubomir Litchev <LLITCHEV@users.noreply.github.com>2016-02-29 21:29:51 -0800
commit444ca211c12c1f424acc1fa275272f284dcccb75 (patch)
treefac989dea90d6eef282b20670237c81c6b841bc0 /tests/src
parent6f6d0f0d797cd6b04ec8678245f73af5b64e89e3 (diff)
parent31cb7975335b33bd04268216e3409a4cd6e9dc29 (diff)
downloadcoreclr-444ca211c12c1f424acc1fa275272f284dcccb75.tar.gz
coreclr-444ca211c12c1f424acc1fa275272f284dcccb75.tar.bz2
coreclr-444ca211c12c1f424acc1fa275272f284dcccb75.zip
Merge pull request #3351 from LLITCHEV/Issue2757
Add support for emitting GC-ness of the second return register for 16…
Diffstat (limited to 'tests/src')
-rw-r--r--tests/src/JIT/Methodical/structs/systemvbringup/structrettest.cs40
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/src/JIT/Methodical/structs/systemvbringup/structrettest.cs b/tests/src/JIT/Methodical/structs/systemvbringup/structrettest.cs
index a5ebce5597..d8a74d7d97 100644
--- a/tests/src/JIT/Methodical/structs/systemvbringup/structrettest.cs
+++ b/tests/src/JIT/Methodical/structs/systemvbringup/structrettest.cs
@@ -38,12 +38,18 @@ namespace structinreg
public float f1;
}
+ struct Test35
+ {
+ public Foo3 foo1;
+ public Foo3 foo2;
+ }
class Program0
{
[MethodImplAttribute(MethodImplOptions.NoInlining)]
Test30 test1()
{
+ Console.WriteLine("From Program0:test1!");
Test30 test1 = default(Test30);
test1.i1 = 1;
test1.i2 = 2;
@@ -54,6 +60,7 @@ namespace structinreg
[MethodImplAttribute(MethodImplOptions.NoInlining)]
Test31 test2()
{
+ Console.WriteLine("From Program0:test2!");
Test31 test2 = default(Test31);
Foo3 foo = new Foo3();
foo.iFoo = 3;
@@ -64,6 +71,7 @@ namespace structinreg
[MethodImplAttribute(MethodImplOptions.NoInlining)]
Test32 test3()
{
+ Console.WriteLine("From Program0:test3!");
Test32 test3 = default(Test32);
Foo3 foo = new Foo3();
foo.iFoo = 4;
@@ -75,6 +83,7 @@ namespace structinreg
[MethodImplAttribute(MethodImplOptions.NoInlining)]
Test33 test4()
{
+ Console.WriteLine("From Program0:test4!");
Test33 test4 = default(Test33);
Foo3 foo1 = new Foo3();
Foo3 foo2 = new Foo3();
@@ -104,6 +113,24 @@ namespace structinreg
}
[MethodImplAttribute(MethodImplOptions.NoInlining)]
+ Test35 test6(Test35 t5)
+ {
+ int fRes = t5.foo1.iFoo + t5.foo2.iFoo;
+ Console.WriteLine("From Test6 members: {0} {1}", t5.foo1.iFoo, t5.foo2.iFoo);
+ Console.WriteLine("From Test6: Res {0}", fRes);
+ if (fRes != 43) {
+ throw new Exception("Failed inside test6 test!");
+ }
+
+ Test35 tst5 = default(Test35);
+ tst5.foo1 = new Foo3();
+ tst5.foo2 = new Foo3();
+ tst5.foo1.iFoo = 28;
+ tst5.foo2.iFoo = 29;
+ return tst5;
+ }
+
+ [MethodImplAttribute(MethodImplOptions.NoInlining)]
public static int Main1()
{
Program0 p = new Program0();
@@ -149,6 +176,19 @@ namespace structinreg
throw new Exception("Failed test5 test!");
}
+ Test35 test6 = default(Test35);
+ test6.foo1 = new Foo3();
+ test6.foo2 = new Foo3();
+ test6.foo1.iFoo = 21;
+ test6.foo2.iFoo = 22;
+
+ Test35 t6Res = p.test6(test6);
+
+ Console.WriteLine("test6 Result: {0}", t6Res.foo1.iFoo + t6Res.foo2.iFoo);
+ if ((t6Res.foo1.iFoo + t6Res.foo2.iFoo) != 57) {
+ throw new Exception("Failed test6 test!");
+ }
+
return 100;
}
}