diff options
author | Zoltan Varga <vargaz@gmail.com> | 2020-01-13 14:09:09 +0300 |
---|---|---|
committer | Alexander Köplinger <alex.koeplinger@outlook.com> | 2020-01-13 14:09:09 +0300 |
commit | 4b718ca1f2547172e3bb68e9b87f1bde11429528 (patch) | |
tree | f2682b3df9f1332bcf9663a293d0ad1df9be7f3e /mcs/class | |
parent | a13f5ccbb60d162fe3a8ffdbb9cd61c9c1f8a425 (diff) |
[jit] Fix an assertion in the Thread.VolatileRead () intrinsic. (#18430)
Fixes https://github.com/mono/mono/issues/18418.
Diffstat (limited to 'mcs/class')
-rw-r--r-- | mcs/class/corlib/Test/System.Threading/ThreadTest.cs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mcs/class/corlib/Test/System.Threading/ThreadTest.cs b/mcs/class/corlib/Test/System.Threading/ThreadTest.cs index 0b605c3d1a3..a563ecefc5e 100644 --- a/mcs/class/corlib/Test/System.Threading/ThreadTest.cs +++ b/mcs/class/corlib/Test/System.Threading/ThreadTest.cs @@ -1313,6 +1313,9 @@ namespace MonoTests.System.Threading Thread.VolatileWrite (ref v3, double.MaxValue); Assert.AreEqual (v3, double.MaxValue); + object o = "ABC"; + Assert.AreEqual ("ABC", Thread.VolatileRead (ref o)); + float v4 = 1; Thread.VolatileWrite (ref v4, float.MaxValue); Assert.AreEqual (v4, float.MaxValue); |