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>2013-11-21 17:41:58 +0400
committerMarek Safar <marek.safar@gmail.com>2013-11-21 17:43:08 +0400
commitd12330eda7746321b4611865d11e932e53ac55b8 (patch)
tree57e313f1d1f4a6539341f234c10ec4b6f3b99d44 /mcs/tests/test-579.cs
parentcc4049bcf262eed46790849a697d3b27bf8bc45a (diff)
[mcs] Reachability and flow analysis rewrite to work on resolved statements and expressions
Diffstat (limited to 'mcs/tests/test-579.cs')
-rw-r--r--mcs/tests/test-579.cs53
1 files changed, 53 insertions, 0 deletions
diff --git a/mcs/tests/test-579.cs b/mcs/tests/test-579.cs
index 9df2a493acd..1f49f63c765 100644
--- a/mcs/tests/test-579.cs
+++ b/mcs/tests/test-579.cs
@@ -4,6 +4,17 @@ public class TestCase
{
public static int Main ()
{
+ if (Test1 () != 0)
+ return 1;
+
+ if (Test2 () != 0)
+ return 2;
+
+ return 0;
+ }
+
+ static int Test1 ()
+ {
int i = 0;
{
goto A;
@@ -21,4 +32,46 @@ public class TestCase
return 0;
}
+
+ static int Test2 ()
+ {
+ int i = 0;
+
+ while (true) {
+ {
+ goto A;
+ A:
+ i += 3;
+ break;
+ }
+ }
+
+ if (i != 3)
+ return 1;
+
+ return 0;
+ }
+
+ static int Test3 ()
+ {
+ int i = 0;
+
+ do {
+ {
+ goto A;
+ A:
+ i += 3;
+ goto X;
+ X:
+ break;
+ }
+#pragma warning disable 162, 429
+ } while (i > 0);
+#pragma warning restore 162, 429
+
+ if (i != 3)
+ return 1;
+
+ return 0;
+ }
}