1 // Bug in gcj 20000427: Java executables can abort trying to access a null 2 // pointer in a leaf function. 3 4 public class PR218 5 { 6 private int i = 5; 7 main(String[] args)8 public static void main(String[] args) 9 { 10 try 11 { 12 new PR218().foo(null); 13 } 14 catch (NullPointerException x) 15 { 16 System.out.println(x); 17 } 18 } 19 foo(PR218 e)20 void foo(PR218 e) 21 { 22 e.i += 4; 23 }; 24 } 25 26 // Expected output: 27 // 28 // java.lang.NullPointerException 29