summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2014-09-15 16:42:07 +1000
committerJason Zaugg <jzaugg@gmail.com>2014-10-01 19:16:09 +1000
commit922a9fc919169ad27f27b25cb48450b368d9329f (patch)
tree7478d62db044596186894b465a0c1cf6d371c39d /test/files/run
parentce7f9f00c2d649f3f9ff3ad11fb2ac91b9094ed3 (diff)
downloadscala-922a9fc919169ad27f27b25cb48450b368d9329f.tar.gz
scala-922a9fc919169ad27f27b25cb48450b368d9329f.tar.bz2
scala-922a9fc919169ad27f27b25cb48450b368d9329f.zip
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`.
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/t8845.flags1
-rw-r--r--test/files/run/t8845.scala17
2 files changed, 18 insertions, 0 deletions
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)
+}