2003-12-13 Patrik Torstensson <p@rxc.se>
authorPatrik Torstensson <totte@mono-cvs.ximian.com>
Tue, 30 Dec 2003 14:38:48 +0000 (14:38 -0000)
committerPatrik Torstensson <totte@mono-cvs.ximian.com>
Tue, 30 Dec 2003 14:38:48 +0000 (14:38 -0000)
* bug-42136.cs: invalid liveness analyse for locals
used in try and catch block. (exceptions not counted
for in the liveness analyse)
* Makefile.am: added bug-42136.cs

svn path=/trunk/mono/; revision=21557

mono/tests/ChangeLog
mono/tests/Makefile.am
mono/tests/bug-42136.cs [new file with mode: 0644]

index 544f096b47be9b7e71363eb5119cfaee907955aa..13cf80c5d078b9db9af5410b634b65b053c0bfbe 100644 (file)
@@ -1,3 +1,10 @@
+2003-12-13  Patrik Torstensson  <p@rxc.se>
+
+       * bug-42136.cs: invalid liveness analyse for locals
+       used in try and catch block. (exceptions not counted 
+       for in the liveness analyse)
+       * Makefile.am: added bug-42136.cs
+       
 2003-12-13  Patrik Torstensson  <p@rxc.se>
 
        * bug-48015.cs: new test for obj.Equals on ContextBound objects
index 8f993b6737edb8906acf38028ba57d7d96ba48d6..65a4f457522d234d5097f8cd5599ad43763807db 100644 (file)
@@ -169,7 +169,8 @@ TEST_CS_SRC=                        \
        bug-27420.cs            \
        bug-47295.cs            \
        bug-46781.cs            \
-       bug-48015.cs
+       bug-48015.cs            \
+       bug-42136.cs
 
 # These only compile with MS CSC
 TEST_CSC_SRC=                  \
diff --git a/mono/tests/bug-42136.cs b/mono/tests/bug-42136.cs
new file mode 100644 (file)
index 0000000..dfa57cd
--- /dev/null
@@ -0,0 +1,29 @@
+using System;
+
+public class Test {
+
+       public static int test_0_liveness_exception() {
+               int id = 1;
+
+               try {
+                       id = 2;
+                       throw new Exception ();
+               }
+               catch (Exception) {
+                       if (id != 2)
+                               return id;
+               }
+
+               return 0;
+       }
+
+       public static int Main() {
+               int res = 0;
+
+               res = test_0_liveness_exception ();
+               if (res != 0)
+                       Console.WriteLine ("error, test_0_liveness_exception res={0}", res);
+               
+               return 0;
+       }
+}