From bd52a339f0c2dfa80b5a9e7a48f38b1d30001352 Mon Sep 17 00:00:00 2001 From: Marek Safar Date: Thu, 3 Jul 2008 15:19:57 +0000 Subject: [PATCH] 2008-07-03 Marek Safar A test for bug #321615 svn path=/trunk/mcs/; revision=107156 --- mcs/tests/test-654.cs | 23 +++++++++++++++++++++++ mcs/tests/ver-il-gmcs.xml | 13 +++++++++++++ 2 files changed, 36 insertions(+) create mode 100755 mcs/tests/test-654.cs diff --git a/mcs/tests/test-654.cs b/mcs/tests/test-654.cs new file mode 100755 index 00000000000..745aaaffc7d --- /dev/null +++ b/mcs/tests/test-654.cs @@ -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; + } + } +} + diff --git a/mcs/tests/ver-il-gmcs.xml b/mcs/tests/ver-il-gmcs.xml index 9dee09ffcee..7f601e622f8 100644 --- a/mcs/tests/ver-il-gmcs.xml +++ b/mcs/tests/ver-il-gmcs.xml @@ -30545,6 +30545,19 @@ + + + + 7 + + + 8 + + + 33 + + + -- 2.25.1