]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* expr.c (JSR): Avoid undefined operation on PC.
authorAndreas Schwab <schwab@suse.de>
Tue, 25 Jun 2002 13:26:04 +0000 (13:26 +0000)
committerAndreas Schwab <schwab@gcc.gnu.org>
Tue, 25 Jun 2002 13:26:04 +0000 (13:26 +0000)
From-SVN: r54986

gcc/java/ChangeLog
gcc/java/expr.c

index 5b8edc088fdb431b403ad65a091302f1ae42ecdd..0e53dc73c3c8476b9a5224bedd8aa496a26a20a7 100644 (file)
@@ -1,3 +1,7 @@
+2002-06-25  Andreas Schwab  <schwab@suse.de>
+
+       * expr.c (JSR): Avoid undefined operation on PC.
+
 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
 
        Don't use RTL inlining. Fix for PR java/6820.
index e62c51bfc78f3459273dfa58765ccafd69b52c73..d38571af00ce9c8addd782404238b19953c9166a 100644 (file)
@@ -2981,7 +2981,11 @@ process_jvm_instruction (PC, byte_ops, length)
   }
 
 #define JSR(OPERAND_TYPE, OPERAND_VALUE) \
-  build_java_jsr (oldpc+OPERAND_VALUE, PC);
+  {                                                \
+    /* OPERAND_VALUE may have side-effects on PC */ \
+    int opvalue = OPERAND_VALUE;                   \
+    build_java_jsr (oldpc + opvalue, PC);          \
+  }
 
 /* Push a constant onto the stack. */
 #define PUSHC(OPERAND_TYPE, OPERAND_VALUE) \