Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2015-09-03 14:05:06 +0300
committerMarek Safar <marek.safar@gmail.com>2015-09-03 14:05:06 +0300
commitebba1494a2e1edf2c24b3638a219cb02ee8adc8e (patch)
treea52759dc6b7019a705ab991af45b6522a9810d07 /mcs/tests/test-927.cs
parent74ef8f7504c9a672a63cf67c8be1776904235969 (diff)
[mcs] Cache fixed array type expression. Fixes #33573
Diffstat (limited to 'mcs/tests/test-927.cs')
-rw-r--r--mcs/tests/test-927.cs27
1 files changed, 27 insertions, 0 deletions
diff --git a/mcs/tests/test-927.cs b/mcs/tests/test-927.cs
new file mode 100644
index 00000000000..3a9df11b232
--- /dev/null
+++ b/mcs/tests/test-927.cs
@@ -0,0 +1,27 @@
+// Compiler options: -unsafe
+
+using System;
+
+class MainClass
+{
+ static int called;
+
+ public static double[] GetTempBuffer ()
+ {
+ ++called;
+ return new double[4];
+ }
+
+ public static int Main ()
+ {
+ unsafe {
+ fixed (double* dummy = GetTempBuffer()) {
+ }
+ }
+
+ if (called != 1)
+ return 1;
+
+ return 0;
+ }
+}