* branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
which branch to outer exception clauses since they could skip the
inner finally clauses. Fixes #78633.
* exceptions.cs: Add a test for the above.
svn path=/trunk/mono/; revision=61667
2006-06-13 Zoltan Varga <vargaz@gmail.com>
+ * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
+ which branch to outer exception clauses since they could skip the
+ inner finally clauses. Fixes #78633.
+
+ * exceptions.cs: Add a test for the above.
+
* mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
Fixes #78629.
}
return 1;
}
+
+ // bug #78633
+ public static int test_0_throw_to_branch_opt_outer_clause () {
+ int i = 0;
+
+ try {
+ try {
+ string [] files = new string[1];
+
+ string s = files[2];
+ } finally {
+ i ++;
+ }
+ } catch {
+ }
+
+ return (i == 1) ? 0 : 1;
+ }
}