2005-02-20 Zoltan Varga <vargaz@freemail.hu>
[mono.git] / mono / mini / basic-calls.cs
index 879d485122371d167f8ef82d563e4a545eee9418..c5c7d97ca25ba3a5a4a965f03db252a2be94f18c 100644 (file)
@@ -286,5 +286,32 @@ class Tests {
        {
                return dum_de_dum;
        }
+
+       /* from bug# 71515 */
+       static int counter = 0;
+       static bool WriteStuff () {
+               counter = 10;
+               return true;
+       }
+       static int test_0_cond_branch_side_effects () {
+               counter = 5;
+               if (WriteStuff());
+               if (counter == 10)
+                       return 0;
+               return 1;
+       }
+
+       static int first_is_zero (int v1, int v2) {
+               if (v1 != 0)
+                       return -1;
+               return v2;
+       }
+       static int test_1_handle_dup_stloc () {
+               int index = 0;
+               int val = first_is_zero (index, ++index);
+               if (val != 1)
+                       return 2;
+               return 1;
+       }
 }