Work around GCJ bug #35410:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35410 .

diff --git a/src/org/mozilla/javascript/Arguments.java b/src/org/mozilla/javascript/Arguments.java
index d914294..d658f12 100644
--- a/src/org/mozilla/javascript/Arguments.java
+++ b/src/org/mozilla/javascript/Arguments.java
@@ -144,7 +144,7 @@ final class Arguments extends IdScriptableObject
                 synchronized (this) {
                     if (args[index] != NOT_FOUND) {
                         if (args == activation.originalArgs) {
-                            args = args.clone();
+                            args = (Object[]) args.clone();
                         }
                         args[index] = value;
                         return;
@@ -162,7 +162,7 @@ final class Arguments extends IdScriptableObject
             synchronized (this) {
                 if (args[index] != NOT_FOUND) {
                     if (args == activation.originalArgs) {
-                        args = args.clone();
+                        args = (Object[]) args.clone();
                     }
                     args[index] = NOT_FOUND;
                     return;
diff --git a/src/org/mozilla/javascript/FunctionObject.java b/src/org/mozilla/javascript/FunctionObject.java
index 1d6c752..3adc100 100644
--- a/src/org/mozilla/javascript/FunctionObject.java
+++ b/src/org/mozilla/javascript/FunctionObject.java
@@ -455,7 +455,7 @@ public class FunctionObject extends BaseFunction
                     Object converted = convertArg(cx, scope, arg, typeTags[i]);
                     if (arg != converted) {
                         if (invokeArgs == args) {
-                            invokeArgs = args.clone();
+                            invokeArgs = (Object[]) args.clone();
                         }
                         invokeArgs[i] = converted;
                     }
diff --git a/src/org/mozilla/javascript/Interpreter.java b/src/org/mozilla/javascript/Interpreter.java
index f7f544d..e125e2f 100644
--- a/src/org/mozilla/javascript/Interpreter.java
+++ b/src/org/mozilla/javascript/Interpreter.java
@@ -285,9 +285,9 @@ public class Interpreter implements Evaluator
             // clone stack but keep varSource to point to values
             // from this frame to share variables.
 
-            copy.stack = stack.clone();
-            copy.stackAttributes = stackAttributes.clone();
-            copy.sDbl = sDbl.clone();
+            copy.stack = (Object[]) stack.clone();
+            copy.stackAttributes = (int[]) stackAttributes.clone();
+            copy.sDbl = (double[]) sDbl.clone();
 
             copy.frozen = false;
             return copy;
diff --git a/src/org/mozilla/javascript/NativeJavaClass.java b/src/org/mozilla/javascript/NativeJavaClass.java
index f72f9e7..25c6757 100644
--- a/src/org/mozilla/javascript/NativeJavaClass.java
+++ b/src/org/mozilla/javascript/NativeJavaClass.java
@@ -271,7 +271,7 @@ public class NativeJavaClass extends NativeJavaObject implements Function
                 Object x = Context.jsToJava(arg, argTypes[i]);
                 if (x != arg) {
                     if (args == origArgs) {
-                        args = origArgs.clone();
+                        args = (Object[]) origArgs.clone();
                     }
                     args[i] = x;
                 }
diff --git a/src/org/mozilla/javascript/NativeJavaMethod.java b/src/org/mozilla/javascript/NativeJavaMethod.java
index b6eaf8b..dc699a0 100644
--- a/src/org/mozilla/javascript/NativeJavaMethod.java
+++ b/src/org/mozilla/javascript/NativeJavaMethod.java
@@ -213,7 +213,7 @@ public class NativeJavaMethod extends BaseFunction
                 Object coerced = Context.jsToJava(arg, argTypes[i]);
                 if (coerced != arg) {
                     if (origArgs == args) {
-                        args = args.clone();
+                        args = (Object[]) args.clone();
                     }
                     args[i] = coerced;
                 }
diff --git a/src/org/mozilla/javascript/regexp/NativeRegExp.java b/src/org/mozilla/javascript/regexp/NativeRegExp.java
index 0bae489..f7124bf 100644
--- a/src/org/mozilla/javascript/regexp/NativeRegExp.java
+++ b/src/org/mozilla/javascript/regexp/NativeRegExp.java
@@ -2168,7 +2168,7 @@ System.out.println("Testing at " + gData.cp + ", op = " + op);
                     // XXX: If backTrackData will no longer be used, then
                     // there is no need to clone backTrackData.parens
                     if (backTrackData.parens != null) {
-                        gData.parens = backTrackData.parens.clone();
+                        gData.parens = (long[]) backTrackData.parens.clone();
                     }
 
                     gData.cp = backTrackData.cp;
@@ -2708,7 +2708,7 @@ class REBackTrackData {
         continuation_pc = pc;
         lastParen = gData.lastParen;
         if (gData.parens != null) {
-            parens = gData.parens.clone();
+            parens = (long[]) gData.parens.clone();
         }
         cp = gData.cp;
         stateStackTop = gData.stateStackTop;
