jdk-24/test/langtools/tools/javac/limits/ArrayDims2.java

41 lines
1.0 KiB
Java

/*
* @test /nodynamiccopyright/
* @bug 4309152
* @summary Compiler silently generates bytecode that exceeds VM limits
* @author gafter
*
* @compile/fail/ref=ArrayDims2.out -XDrawDiagnostics ArrayDims2.java
*/
class ArrayDims2 {
static Object
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][][][][][]
[][][][][][] o; // 256 = too many
public static void main(String[] args) {
}
}