Test for PR gcj/218:
2000-04-28 Bryce McKinlay <bryce@albatross.co.nz> Test for PR gcj/218: * libjava.lang/PR218.java: New file. * libjava.lang/PR218.out: New file. From-SVN: r33506
This commit is contained in:
parent
27c58e25f7
commit
ceed610d1d
|
@ -1,3 +1,9 @@
|
|||
2000-04-28 Bryce McKinlay <bryce@albatross.co.nz>
|
||||
|
||||
Test for PR gcj/218:
|
||||
* libjava.lang/PR218.java: New file.
|
||||
* libjava.lang/PR218.out: New file.
|
||||
|
||||
2000-04-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
|
||||
|
||||
* libjava.compile/MethodFailure4.java: New file.
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
// 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
|
|
@ -0,0 +1 @@
|
|||
java.lang.NullPointerException
|
Loading…
Reference in New Issue