From 922a9fc919169ad27f27b25cb48450b368d9329f Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Mon, 15 Sep 2014 16:42:07 +1000 Subject: SI-8845 Control flow pot-pourri crashes GenASM, but not -BCode Given that we'll switch to GenBCode in 2.12, the test case showing the bug is fixed under that option is all I plan to offer for this bug. The flags file contains `-Ynooptimize` to stay locked into `GenBCode`. --- test/files/run/t8845.flags | 1 + test/files/run/t8845.scala | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 test/files/run/t8845.flags create mode 100644 test/files/run/t8845.scala (limited to 'test') diff --git a/test/files/run/t8845.flags b/test/files/run/t8845.flags new file mode 100644 index 0000000000..aada25f80d --- /dev/null +++ b/test/files/run/t8845.flags @@ -0,0 +1 @@ +-Ybackend:GenBCode -Ynooptimize diff --git a/test/files/run/t8845.scala b/test/files/run/t8845.scala new file mode 100644 index 0000000000..8ccdbdadc7 --- /dev/null +++ b/test/files/run/t8845.scala @@ -0,0 +1,17 @@ +// crashes compiler under GenASM, works under GenBCode. +object Interpreter { + def mkDataProp(i: Int) = i + def break(n: Int): Unit = + try { + n match { + case _ => + val newDesc = mkDataProp(n) + n match { case _ => return } + } + } catch { case e: Throwable => } + finally { } +} + +object Test extends App { + Interpreter.break(0) +} -- cgit v1.2.3