aboutsummaryrefslogtreecommitdiff
path: root/libjava/testsuite
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2003-06-08 18:17:53 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2003-06-08 18:17:53 +0000
commit5f158b4400a84d31b7180fbc96b1419264843328 (patch)
treedee5dc24a26ca2e2b97de7e17aacd6263f8d6a1c /libjava/testsuite
parentf32c53c2153535de4c9016cd174330be4c9a6027 (diff)
downloadgcc-5f158b4400a84d31b7180fbc96b1419264843328.zip
gcc-5f158b4400a84d31b7180fbc96b1419264843328.tar.gz
gcc-5f158b4400a84d31b7180fbc96b1419264843328.tar.bz2
builtins.c (define_builtin_type, [...]): Delete.
* builtins.c (define_builtin_type, builtin_types): Delete. (define_builtin): Rewritten to take just the built-in code, the function's name, type and fallback library function name. All built-ins used by Java are implicit and BUILT_IN_NORMAL. (initialize_builtins): Overhaul to define the GCC builtins used by gcj manually, providing the Java run-time's implementations as the fallback library function. * libjava.lang/MathBuiltin.java: New test case. * libjava.lang/MathBuiltin.out: New file. From-SVN: r67632
Diffstat (limited to 'libjava/testsuite')
-rw-r--r--libjava/testsuite/ChangeLog5
-rw-r--r--libjava/testsuite/libjava.lang/MathBuiltin.java70
-rw-r--r--libjava/testsuite/libjava.lang/MathBuiltin.out0
3 files changed, 75 insertions, 0 deletions
diff --git a/libjava/testsuite/ChangeLog b/libjava/testsuite/ChangeLog
index 13020ac..ac9493b 100644
--- a/libjava/testsuite/ChangeLog
+++ b/libjava/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2003-06-08 Roger Sayle <roger@eyesopen.com>
+
+ * libjava.lang/MathBuiltin.java: New test case.
+ * libjava.lang/MathBuiltin.out: New file.
+
2003-06-05 Mark Wielaard <mark@klomp.org>
* libjava.mauve/mauve.exp (test_mauve): Add -wno-deprecated to GCJ.
diff --git a/libjava/testsuite/libjava.lang/MathBuiltin.java b/libjava/testsuite/libjava.lang/MathBuiltin.java
new file mode 100644
index 0000000..9a4c367
--- /dev/null
+++ b/libjava/testsuite/libjava.lang/MathBuiltin.java
@@ -0,0 +1,70 @@
+class MathBuiltin
+{
+ static double abs(double x)
+ {
+ return Math.abs(x);
+ }
+
+ static double atan(double x)
+ {
+ return Math.atan(x);
+ }
+
+ static double atan2(double x, double y)
+ {
+ return Math.atan2(x,y);
+ }
+
+ static double cos(double x)
+ {
+ return Math.cos(x);
+ }
+
+ static double exp(double x)
+ {
+ return Math.exp(x);
+ }
+
+ static double log(double x)
+ {
+ return Math.log(x);
+ }
+
+ static double max(double x, double y)
+ {
+ return Math.max(x,y);
+ }
+
+ static double min(double x, double y)
+ {
+ return Math.min(x,y);
+ }
+
+ static double pow(double x, double y)
+ {
+ return Math.pow(x,y);
+ }
+
+ static double sin(double x)
+ {
+ return Math.sin(x);
+ }
+
+ static double sqrt(double x)
+ {
+ return Math.sqrt(x);
+ }
+
+ static double tan(double x)
+ {
+ return Math.tan(x);
+ }
+
+ public static void main(String argv[])
+ {
+ double sum = abs (1.0) + atan (1.0) + atan2 (1.0, 1.0) + cos (1.0)
+ + exp (1.0) + log(1.0) + max(1.0, 1.0) + min (1.0, 1.0)
+ + pow (1.0, 1.0) + sin (1.0) + sqrt(1.0) + tan(1.0);
+ }
+}
+
diff --git a/libjava/testsuite/libjava.lang/MathBuiltin.out b/libjava/testsuite/libjava.lang/MathBuiltin.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/libjava/testsuite/libjava.lang/MathBuiltin.out