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>2008-03-19 13:40:04 +0300
committerMarek Safar <marek.safar@gmail.com>2008-03-19 13:40:04 +0300
commit1c8fae07ebaa65df374f4ad61c208dcb6e1f3fb6 (patch)
tree24bac33b6fd4d860cbbcb0c9f81ee1d7d0f6e9fc /mcs/tests/test-592.cs
parent32844a97f236ce3fd52a475393c0833d692fe2ce (diff)
parentb251ce784aa16f7c3d52dfc4f334ee7b02f07c50 (diff)
New tests, renamed verify-*.cs
svn path=/trunk/mcs/; revision=98581
Diffstat (limited to 'mcs/tests/test-592.cs')
-rw-r--r--mcs/tests/test-592.cs65
1 files changed, 65 insertions, 0 deletions
diff --git a/mcs/tests/test-592.cs b/mcs/tests/test-592.cs
new file mode 100644
index 00000000000..8ddf88f6c2c
--- /dev/null
+++ b/mcs/tests/test-592.cs
@@ -0,0 +1,65 @@
+class T {
+ static int fib (int n) {
+ int f0 = 0, f1 = 1, f2 = 0, i;
+
+ if (n <= 1) goto L3;
+ i = 2;
+ L1:
+ if (i <= n) goto L2;
+ return f2;
+ L2:
+ f2 = f0 + f1;
+ f0 = f1;
+ f1 = f2;
+ i++;
+ goto L1;
+ L3:
+ return n;
+ }
+
+ static int xx (int n) {
+ if (n <= 1) goto L3;
+ L1:
+ if (1 <= n) goto L2;
+ return n;
+ L2:
+ goto L1;
+ L3:
+ return n;
+ }
+
+ // This is from System.Text.RegularExpressions.Syntax.Parser::ParseGroup.
+ void foo (int a)
+ {
+ bool b = false;
+
+ while (true) {
+ switch (a) {
+ case 3:
+ break;
+ }
+
+ if (b)
+ goto EndOfGroup;
+ }
+
+ EndOfGroup:
+ ;
+ }
+
+ // Another case of goto that we did not handle properly
+ static void XXXA () {
+ goto each_logic_expr;
+
+ int j;
+ bool x = true;
+ try {
+ }
+ catch {}
+ int dd;
+ each_logic_expr:
+ ;
+ }
+
+ static void Main() {}
+}