diff options
-rw-r--r-- | src/compiler/scala/tools/nsc/backend/opt/DeadCodeElimination.scala | 2 | ||||
-rw-r--r-- | test/files/run/t8601.flags | 1 | ||||
-rw-r--r-- | test/files/run/t8601.scala | 15 | ||||
-rw-r--r-- | test/files/run/t8601b.flags | 1 | ||||
-rw-r--r-- | test/files/run/t8601b.scala | 9 |
5 files changed, 0 insertions, 28 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/opt/DeadCodeElimination.scala b/src/compiler/scala/tools/nsc/backend/opt/DeadCodeElimination.scala index 3c983e6fdf..90c37ba0b3 100644 --- a/src/compiler/scala/tools/nsc/backend/opt/DeadCodeElimination.scala +++ b/src/compiler/scala/tools/nsc/backend/opt/DeadCodeElimination.scala @@ -193,8 +193,6 @@ abstract class DeadCodeElimination extends SubComponent { moveToWorkListIf(necessary) case LOAD_MODULE(sym) if isLoadNeeded(sym) => moveToWorkList() // SI-4859 Module initialization might side-effect. - case CALL_PRIMITIVE(Arithmetic(DIV | REM, INT | LONG) | ArrayLength(_)) => - moveToWorkList() // SI-8601 Might divide by zero case _ => () moveToWorkListIf(cond = false) } diff --git a/test/files/run/t8601.flags b/test/files/run/t8601.flags deleted file mode 100644 index 1182725e86..0000000000 --- a/test/files/run/t8601.flags +++ /dev/null @@ -1 +0,0 @@ --optimize
\ No newline at end of file diff --git a/test/files/run/t8601.scala b/test/files/run/t8601.scala deleted file mode 100644 index e1afc23cc4..0000000000 --- a/test/files/run/t8601.scala +++ /dev/null @@ -1,15 +0,0 @@ -object Test { - def idiv(x: Int): Unit = x / 0 - def ldiv(x: Long): Unit = x / 0 - def irem(x: Int): Unit = x % 0 - def lrem(x: Long): Unit = x % 0 - - def check(x: => Any) = try { x; sys.error("failed to throw divide by zero!") } catch { case _: ArithmeticException => } - - def main(args: Array[String]) { - check(idiv(1)) - check(ldiv(1L)) - check(irem(1)) - check(lrem(1L)) - } -} diff --git a/test/files/run/t8601b.flags b/test/files/run/t8601b.flags deleted file mode 100644 index 1182725e86..0000000000 --- a/test/files/run/t8601b.flags +++ /dev/null @@ -1 +0,0 @@ --optimize
\ No newline at end of file diff --git a/test/files/run/t8601b.scala b/test/files/run/t8601b.scala deleted file mode 100644 index 42b562af96..0000000000 --- a/test/files/run/t8601b.scala +++ /dev/null @@ -1,9 +0,0 @@ -object Test { - def len(x: Array[String]): Unit = x.length - - def check(x: => Any) = try { x; sys.error("failed to throw NPE!") } catch { case _: NullPointerException => } - - def main(args: Array[String]) { - check(len(null)) - } -} |