OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libjava/] [testsuite/] [libjava.lang/] [PR218.java] - Blame information for rev 861

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 765 jeremybenn
// 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
 
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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.