mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-11-29 06:59:59 +08:00
stringconst.out: New file.
* libjava.lang/stringconst.out: New file. * libjava.lang/stringconst.java: New file. From-SVN: r34115
This commit is contained in:
parent
cd2b33d005
commit
665bfbb0b4
@ -1,3 +1,8 @@
|
||||
2000-05-23 Tom Tromey <tromey@cygnus.com>
|
||||
|
||||
* libjava.lang/stringconst.out: New file.
|
||||
* libjava.lang/stringconst.java: New file.
|
||||
|
||||
2000-05-22 Bryce McKinlay <bryce@albatross.co.nz>
|
||||
|
||||
* libjava.compile/PR232B.java: Additional PR gcj/232 test.
|
||||
|
22
libjava/testsuite/libjava.lang/stringconst.java
Normal file
22
libjava/testsuite/libjava.lang/stringconst.java
Normal file
@ -0,0 +1,22 @@
|
||||
// A reference to a String shouldn't cause an interface to be
|
||||
// initialized.
|
||||
|
||||
interface I
|
||||
{
|
||||
String z = "zardoz";
|
||||
int q = stringconst.out ("q", 0);
|
||||
}
|
||||
|
||||
public class stringconst
|
||||
{
|
||||
public static int out (String s, int i)
|
||||
{
|
||||
System.out.println (s + "=" + i);
|
||||
return i;
|
||||
}
|
||||
|
||||
public static void main (String[] args)
|
||||
{
|
||||
System.out.println (I.z);
|
||||
}
|
||||
}
|
1
libjava/testsuite/libjava.lang/stringconst.out
Normal file
1
libjava/testsuite/libjava.lang/stringconst.out
Normal file
@ -0,0 +1 @@
|
||||
zardoz
|
Loading…
Reference in New Issue
Block a user