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

41 lines
1.1 KiB
Java

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