prims.cc (catch_fpe): Call to HANDLE_DIVIDE_OVERFLOW added.
1999-05-20 Andrew Haley <aph@cygnus.com> * libjava/prims.cc (catch_fpe): Call to HANDLE_DIVIDE_OVERFLOW added. * include/i386-signal.h (HANDLE_DIVIDE_OVERFLOW): New macro. (INIT_FPE): Exception string made more informative. * include/sparc-signal.h (INIT_FPE): Exception string made more informative. * testsuite/libjava.lang/Divide_1.java: New file. * testsuite/libjava.lang/Divide_1.out: New file. From-SVN: r27056
This commit is contained in:
parent
bf3118d04b
commit
554b61bb30
6 changed files with 211 additions and 8 deletions
105
libjava/testsuite/libjava.lang/Divide_1.java
Normal file
105
libjava/testsuite/libjava.lang/Divide_1.java
Normal file
|
@ -0,0 +1,105 @@
|
|||
public class Divide_1
|
||||
{
|
||||
static int b = Integer.parseInt ("-1");
|
||||
int b1 = Integer.parseInt ("-1");
|
||||
static int zero = Integer.parseInt ("0");
|
||||
|
||||
void probe ()
|
||||
{
|
||||
try {
|
||||
int a = Integer.parseInt ("-80000000", 16);
|
||||
int c = a/b;
|
||||
System.out.println (c);
|
||||
} catch (Exception _) {
|
||||
System.out.println (_);
|
||||
}
|
||||
|
||||
try {
|
||||
int a = Integer.parseInt ("-80000000", 16);
|
||||
int c = a/-1;
|
||||
System.out.println (c);
|
||||
} catch (Exception _) {
|
||||
System.out.println (_);
|
||||
}
|
||||
|
||||
try {
|
||||
int a = Integer.parseInt ("-80000000", 16);
|
||||
int c = a%b;
|
||||
System.out.println (c);
|
||||
} catch (Exception _) {
|
||||
System.out.println (_);
|
||||
}
|
||||
|
||||
try {
|
||||
int a = Integer.parseInt ("-80000000", 16);
|
||||
int c = a%b1;
|
||||
System.out.println (c);
|
||||
} catch (Exception _) {
|
||||
System.out.println (_);
|
||||
}
|
||||
|
||||
try {
|
||||
int a = Integer.parseInt ("-80000000", 16);
|
||||
int c = a%-1;
|
||||
System.out.println (c);
|
||||
} catch (Exception _) {
|
||||
System.out.println (_);
|
||||
}
|
||||
|
||||
try {
|
||||
int a = Integer.parseInt ("8000", 16);
|
||||
int b = Integer.parseInt ("0", 16);
|
||||
int c = a/b;
|
||||
System.out.println (c);
|
||||
} catch (Exception _) {
|
||||
System.out.println (_);
|
||||
}
|
||||
|
||||
try {
|
||||
int a = Integer.parseInt ("8000", 16);
|
||||
int b = Integer.parseInt ("0", 16);
|
||||
int c = a%b;
|
||||
System.out.println (c);
|
||||
} catch (Exception _) {
|
||||
System.out.println (_);
|
||||
}
|
||||
|
||||
try {
|
||||
long a = Long.parseLong ("-8000000000000000", 16);
|
||||
long c = a/b;
|
||||
System.out.println (c);
|
||||
} catch (Exception _) {
|
||||
System.out.println (_);
|
||||
}
|
||||
|
||||
try {
|
||||
long a = Long.parseLong ("-8000000000000000", 16);
|
||||
long c = a%b;
|
||||
System.out.println (c);
|
||||
} catch (Exception _) {
|
||||
System.out.println (_);
|
||||
}
|
||||
|
||||
try {
|
||||
long a = Long.parseLong ("8000", 16);
|
||||
long b = Long.parseLong ("0", 16);
|
||||
long c = a/b;
|
||||
System.out.println (c);
|
||||
} catch (Exception _) {
|
||||
System.out.println (_);
|
||||
}
|
||||
|
||||
try {
|
||||
long a = Long.parseLong ("8000", 16);
|
||||
long b = Long.parseLong ("0", 16);
|
||||
long c = a%b;
|
||||
System.out.println (c);
|
||||
} catch (Exception _) {
|
||||
System.out.println (_);
|
||||
}
|
||||
}
|
||||
|
||||
public static void main (String[] args) {
|
||||
new Divide_1 ().probe ();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue