Allow clinits that create a singleton instance to be postponed

Bug: 142762129
Change-Id: Iaa472dcf1b52dad304488ed3855fbceb16f20f9d
diff --git a/src/test/examples/classmerging/ConflictingInterfaceSignaturesTest.java b/src/test/examples/classmerging/ConflictingInterfaceSignaturesTest.java
index 223ff37..7de7a1f 100644
--- a/src/test/examples/classmerging/ConflictingInterfaceSignaturesTest.java
+++ b/src/test/examples/classmerging/ConflictingInterfaceSignaturesTest.java
@@ -12,6 +12,17 @@
 
     B b = new InterfaceImpl();
     b.foo();
+
+    // Ensure that the instantiations are not dead code eliminated.
+    escape(a);
+    escape(b);
+  }
+
+  @NeverInline
+  static void escape(Object o) {
+    if (System.currentTimeMillis() < 0) {
+      System.out.println(o);
+    }
   }
 
   public interface A {