Dead
[official-gcc.git] / gomp-20050608-branch / libjava / testsuite / libjava.lang / Divide_1.java
blob50db00935ba32d0ba6af6e2bd490dca142f1b6ba
1 public class Divide_1
3 static int b = Integer.parseInt ("-1");
4 int b1 = Integer.parseInt ("-1");
5 static int zero = Integer.parseInt ("0");
7 void probe_1 ()
9 try {
10 int a = Integer.parseInt ("-80000000", 16);
11 int c = a/b;
12 System.out.println (c);
13 } catch (Exception _) {
14 System.out.println (_);
17 try {
18 int a = Integer.parseInt ("-80000000", 16);
19 int c = a/-1;
20 System.out.println (c);
21 } catch (Exception _) {
22 System.out.println (_);
25 try {
26 int a = Integer.parseInt ("-80000000", 16);
27 int c = a%b;
28 System.out.println (c);
29 } catch (Exception _) {
30 System.out.println (_);
33 try {
34 int a = Integer.parseInt ("-80000000", 16);
35 int c = a%b1;
36 System.out.println (c);
37 } catch (Exception _) {
38 System.out.println (_);
41 try {
42 int a = Integer.parseInt ("-80000000", 16);
43 int c = a%-1;
44 System.out.println (c);
45 } catch (Exception _) {
46 System.out.println (_);
49 try {
50 int a = Integer.parseInt ("8000", 16);
51 int b = Integer.parseInt ("0", 16);
52 int c = a/b;
53 System.out.println (c);
54 } catch (Exception _) {
55 System.out.println (_);
58 try {
59 int a = Integer.parseInt ("8000", 16);
60 int b = Integer.parseInt ("0", 16);
61 int c = a%b;
62 System.out.println (c);
63 } catch (Exception _) {
64 System.out.println (_);
67 try {
68 long a = Long.parseLong ("-8000000000000000", 16);
69 long c = a/b;
70 System.out.println (c);
71 } catch (Exception _) {
72 System.out.println (_);
75 try {
76 long a = Long.parseLong ("-8000000000000000", 16);
77 long c = a%b;
78 System.out.println (c);
79 } catch (Exception _) {
80 System.out.println (_);
83 try {
84 long a = Long.parseLong ("8000", 16);
85 long b = Long.parseLong ("0", 16);
86 long c = a/b;
87 System.out.println (c);
88 } catch (Exception _) {
89 System.out.println (_);
92 try {
93 long a = Long.parseLong ("8000", 16);
94 long b = Long.parseLong ("0", 16);
95 long c = a%b;
96 System.out.println (c);
97 } catch (Exception _) {
98 System.out.println (_);
102 void probe_2 ()
104 try {
105 int a = -0x80000000;
106 int c = a/b;
107 System.out.println (c);
108 } catch (Exception _) {
109 System.out.println (_);
112 try {
113 int a = -0x80000000;
114 int c = a/-1;
115 System.out.println (c);
116 } catch (Exception _) {
117 System.out.println (_);
120 try {
121 int a = -0x80000000;
122 int c = a%b;
123 System.out.println (c);
124 } catch (Exception _) {
125 System.out.println (_);
128 try {
129 int a = -0x80000000;
130 int c = a%b1;
131 System.out.println (c);
132 } catch (Exception _) {
133 System.out.println (_);
136 try {
137 int a = -0x80000000;
138 int c = a%-1;
139 System.out.println (c);
140 } catch (Exception _) {
141 System.out.println (_);
144 try {
145 int a = 0x8000;
146 int b = 0;
147 int c = a/b;
148 System.out.println (c);
149 } catch (Exception _) {
150 System.out.println (_);
153 try {
154 int a = 0x8000;
155 int b = 0;
156 int c = a%b;
157 System.out.println (c);
158 } catch (Exception _) {
159 System.out.println (_);
162 try {
163 long a = -0x7fffffffffffffffL - 1;
164 long c = a/b;
165 System.out.println (c);
166 } catch (Exception _) {
167 System.out.println (_);
170 try {
171 long a = -0x7fffffffffffffffL - 1;
172 long c = a%b;
173 System.out.println (c);
174 } catch (Exception _) {
175 System.out.println (_);
178 try {
179 long a = 0x8000;
180 long b = 0;
181 long c = a/b;
182 System.out.println (c);
183 } catch (Exception _) {
184 System.out.println (_);
187 try {
188 long a = 0x8000;
189 long b = 0;
190 long c = a%b;
191 System.out.println (c);
192 } catch (Exception _) {
193 System.out.println (_);
197 public static void main (String[] args)
199 Divide_1 d = new Divide_1 ();
200 d.probe_1 ();
201 d.probe_2 ();