projects
/
mono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0fa3a34
)
2007-12-23 Marek Safar <marek.safar@gmail.com>
author
Marek Safar
<marek.safar@gmail.com>
Sun, 23 Dec 2007 14:42:13 +0000
(14:42 -0000)
committer
Marek Safar
<marek.safar@gmail.com>
Sun, 23 Dec 2007 14:42:13 +0000
(14:42 -0000)
A test for bug #346379
svn path=/trunk/mcs/; revision=91834
mcs/tests/test-603.cs
[new file with mode: 0644]
patch
|
blob
diff --git a/mcs/tests/test-603.cs
b/mcs/tests/test-603.cs
new file mode 100644
(file)
index 0000000..
c32bfb8
--- /dev/null
+++ b/
mcs/tests/test-603.cs
@@ -0,0
+1,30
@@
+// Compiler options: -unsafe
+
+using System;
+
+namespace ConsoleApplication1
+{
+ public struct Strct
+ {
+ public uint a;
+ public uint b;
+ }
+
+ unsafe class Program
+ {
+ static Strct* ptr = null;
+
+ static int Main ()
+ {
+ Strct* values = ptr;
+ values++;
+ values++;
+
+ long diff = values - ptr;
+ if (diff != 2)
+ return 1;
+
+ return 0;
+ }
+ }
+}