From 7892bbf38fb77e7d2f1361515f14280b3a513c96 Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Tue, 20 May 2014 12:31:00 +0200 Subject: SI-8601 Test that static LOAD_FIELD is not eliminated This test fails under 2.11.0, and works now that DCE treats static loads as useful instructions. --- test/files/run/t8601e/StaticInit.java | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 test/files/run/t8601e/StaticInit.java (limited to 'test/files/run/t8601e/StaticInit.java') diff --git a/test/files/run/t8601e/StaticInit.java b/test/files/run/t8601e/StaticInit.java new file mode 100644 index 0000000000..7543ed98b8 --- /dev/null +++ b/test/files/run/t8601e/StaticInit.java @@ -0,0 +1,8 @@ +public class StaticInit { + static { + if ("".isEmpty()) { + throw new RuntimeException(); + } + } + public static int fld = 42; +} -- cgit v1.2.3