Multiple exit loop handling in ivopts. Regression tested on x86-64/linux
[official-gcc.git] / libjava / testsuite / libjava.lang / InvokeInterface.java
blob6f4dc617d39fa14a55df487f8a59d1920b830d0e
1 import java.lang.reflect.*;
3 interface one
5 int n(int N);
8 interface two
10 int nn(int N);
13 interface three
15 int nnn(int N);
18 class arse implements one, two
20 public int n(int N) { return N; }
21 public int nn(int N) { return N*2; }
24 class arsey implements two, one, three
26 public int n(int N) { return N*4; }
27 public int nn(int N) { return N*8; }
28 public int nnn(int N) { return N*16; }
31 public class InvokeInterface extends arse
33 int f ()
35 return flunk.nn(1);
37 static two flunk = new arse();
38 static three flunkey = new arsey();
39 public static void main(String[] s) throws Throwable
41 Class[] argtypes = {Integer.TYPE};
42 Method m = two.class.getMethod("nn", argtypes);
43 Object[] args = {new Integer(1)};
44 System.out.println(flunk.nn(1));
45 System.out.println(m.invoke(new arse(), args));
46 m = arse.class.getMethod("nn", argtypes);
47 System.out.println(m.invoke(new arse(), args));
48 m = two.class.getMethod("nn", argtypes);
49 System.out.println(m.invoke(new arsey(), args));
50 m = three.class.getMethod("nnn", argtypes);
51 System.out.println(m.invoke(new arsey(), args));
52 m = arsey.class.getMethod("nnn", argtypes);
53 System.out.println(m.invoke(new arsey(), args));