2008-07-03 Marek Safar <marek.safar@gmail.com>
authorMarek Safar <marek.safar@gmail.com>
Thu, 3 Jul 2008 15:19:57 +0000 (15:19 -0000)
committerMarek Safar <marek.safar@gmail.com>
Thu, 3 Jul 2008 15:19:57 +0000 (15:19 -0000)
A test for bug #321615

svn path=/trunk/mcs/; revision=107156

mcs/tests/test-654.cs [new file with mode: 0755]
mcs/tests/ver-il-gmcs.xml

diff --git a/mcs/tests/test-654.cs b/mcs/tests/test-654.cs
new file mode 100755 (executable)
index 0000000..745aaaf
--- /dev/null
@@ -0,0 +1,23 @@
+// Compiler options: -unsafe
+
+using System;
+
+class Program
+{
+       static unsafe int Main ()
+       {
+               return Test ((sbyte*) (-1));
+       }
+
+       static unsafe int Test (sbyte* x)
+       {
+               if ((x + 1) < x) {
+                       Console.WriteLine ("OK");
+                       return 0;
+               } else {
+                       Console.WriteLine ("BAD");
+                       return 1;
+               }
+       }
+}
+
index 9dee09ffcee42ab6890d4a8d1f2779013e4bb644..7f601e622f835863f842adf12b3e88b99d1415c4 100644 (file)
       </method>
     </type>
   </test>
+  <test name="test-654.cs">
+    <type name="Program">
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>8</size>
+      </method>
+      <method name="Int32 Test(System.SByte*)">
+        <size>33</size>
+      </method>
+    </type>
+  </test>
   <test name="test-66.cs">
     <type name="Y">
       <method name="Void .ctor()">