From 790ed59d9fe5ca396984b8a5135b7a091e4224f7 Mon Sep 17 00:00:00 2001 From: Lukas Rytz Date: Sat, 23 Jan 2016 21:03:10 +0100 Subject: SI-8601 Don't treat newarray as dead code Otherwise we lose the side effect of a `NegativeArraySizeException`. A test for this case already exists (run/t8601b.scala), but it currently enforces `-optimize -Ybackend:GenASM`, so it didn't trigger on the new backend. However, PR #4814 was merged into 2.12.x and moved that test over to the new backend and optimizer. After merging the 2.12.x into the current optimizer branch (push-pop elimination), the test started failing. Also disable the optimizer for `jvm/bytecode-test-example`: it counts the number of null checks in a method, the optimizer (rightly) eliminates one of the two. --- test/files/jvm/bytecode-test-example.flags | 1 + 1 file changed, 1 insertion(+) create mode 100644 test/files/jvm/bytecode-test-example.flags (limited to 'test/files/jvm/bytecode-test-example.flags') diff --git a/test/files/jvm/bytecode-test-example.flags b/test/files/jvm/bytecode-test-example.flags new file mode 100644 index 0000000000..bc22511cff --- /dev/null +++ b/test/files/jvm/bytecode-test-example.flags @@ -0,0 +1 @@ +-Yopt:l:none -- cgit v1.2.3