diff options
Diffstat (limited to 'gcc/java')
-rw-r--r-- | gcc/java/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/java/expr.c | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 3ec4beedcbd..e92ceff7d2a 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,7 @@ +2002-06-25 Andreas Schwab <schwab@suse.de> + + * expr.c (JSR): Avoid undefined operation on PC. + 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * decl.c (clear_binding_level): Const-ify. diff --git a/gcc/java/expr.c b/gcc/java/expr.c index 08525beb90b..3b765e43412 100644 --- a/gcc/java/expr.c +++ b/gcc/java/expr.c @@ -2946,7 +2946,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) \ |