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:
authorRaja R Harinath <harinath@hurrynot.org>2006-05-18 19:34:54 +0400
committerRaja R Harinath <harinath@hurrynot.org>2006-05-18 19:34:54 +0400
commit2832f4c892d184a86ecc60996672b6d78080c42a (patch)
tree0e42002a4e95470ec2b2c6d0c40510399b817960 /mcs/tests/test-518.cs
parent88159a2ae7ced4e02343256feb84718d05dd98b9 (diff)
In mcs:
Fix #77601 * statement.cs (Goto.Resolve): Move responsibility for resolving 'goto' to FlowBranching.AddGotoOrigin. (Goto.SetResolvedTarget): New. Callback to set the LabeledStatement that's the target of the goto. (Goto.DoEmit): Use Leave instead of Br when crossing an unwind-protect boundary. * flowanalysis.cs (FlowBranching.AddGotoOrigin): Rename from LookupLabel and adjust to new semantics. (FlowBranchingToplevel.AddGotoOrigin): Likewise. (FlowBranchingBlock.AddGotoOrigin): Likewise. Use Goto.SetResolvedTarget to update target. (FlowBranchingLabeled.AddGotoOrigin): Likewise. (FlowBranchingException.AddGotoOrigin): Rewrite to be similar to AddBreakOrigin & co. Delay propagation until ... (FlowBranchingException.Merge): ... this. In gmcs: Fix #77601 * statement.cs (Goto.Resolve): Move responsibility for resolving 'goto' to FlowBranching.AddGotoOrigin. (Goto.SetResolvedTarget): New. Callback to set the LabeledStatement that's the target of the goto. (Goto.DoEmit): Use Leave instead of Br when crossing an unwind-protect boundary. * flowanalysis.cs (FlowBranching.AddGotoOrigin): Rename from LookupLabel and adjust to new semantics. (FlowBranchingToplevel.AddGotoOrigin): Likewise. (FlowBranchingBlock.AddGotoOrigin): Likewise. Use Goto.SetResolvedTarget to update target. (FlowBranchingLabeled.AddGotoOrigin): Likewise. (FlowBranchingException.AddGotoOrigin): Rewrite to be similar to AddBreakOrigin & co. Delay propagation until ... (FlowBranchingException.Merge): ... this. In tests: * test-518.cs: New test based on #77601. svn path=/trunk/mcs/; revision=60827
Diffstat (limited to 'mcs/tests/test-518.cs')
-rw-r--r--mcs/tests/test-518.cs14
1 files changed, 14 insertions, 0 deletions
diff --git a/mcs/tests/test-518.cs b/mcs/tests/test-518.cs
new file mode 100644
index 00000000000..d4e4841de7a
--- /dev/null
+++ b/mcs/tests/test-518.cs
@@ -0,0 +1,14 @@
+class Foo {
+ static int Main ()
+ {
+ int ret = 1;
+ try {
+ goto done;
+ } finally {
+ ret = 0;
+ }
+ done:
+ return ret;
+ }
+}
+