diff options
author | schwab <schwab@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-06-25 13:27:19 +0000 |
---|---|---|
committer | schwab <schwab@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-06-25 13:27:19 +0000 |
commit | d7afb332a58bacfbef31115c7cc9c4c02e4367bd (patch) | |
tree | 2fb86914b09a13a34168bfedcb69a4e38badbd9b /gcc/java | |
parent | bbe6e35a12b834a74d1eb31df6dbffac1c69c902 (diff) | |
download | gcc-d7afb332a58bacfbef31115c7cc9c4c02e4367bd.tar.gz |
* expr.c (JSR): Avoid undefined operation on PC.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54987 138bc75d-0d04-0410-961f-82ee72b054a4
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) \ |