source: trunk/gcc/libjava/testsuite/libjava.lang/PR218.java

Last change on this file was 2, checked in by bird, 22 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 433 bytes
Line 
1// Bug in gcj 20000427: Java executables can abort trying to access a null
2// pointer in a leaf function.
3
4public class PR218
5{
6 private int i = 5;
7
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
20 void foo(PR218 e)
21 {
22 e.i += 4;
23 };
24}
25
26// Expected output:
27//
28// java.lang.NullPointerException
Note: See TracBrowser for help on using the repository browser.