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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libjava/] [testsuite/] [libjava.lang/] [PR218.java] - Rev 765

Compare with Previous | Blame | View Log

// Bug in gcj 20000427: Java executables can abort trying to access a null 
// pointer in a leaf function.
 
public class PR218
{
  private int i = 5;
 
  public static void main(String[] args)
  {
    try
    {
      new PR218().foo(null);
    }
    catch (NullPointerException x)
    {
      System.out.println(x);
    }
  }
 
  void foo(PR218 e)
  {
    e.i += 4;
  };
}
 
// Expected output:
//
// java.lang.NullPointerException
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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