aboutsummaryrefslogtreecommitdiff
path: root/gcc/java
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/java')
-rw-r--r--gcc/java/ChangeLog6
-rw-r--r--gcc/java/jcf-write.c10
2 files changed, 13 insertions, 3 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 5ffb6df..af1c42b 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,5 +1,11 @@
2006-09-12 Tom Tromey <tromey@redhat.com>
+ PR java/29013:
+ * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Always note
+ the push of the called method's return result.
+
+2006-09-12 Tom Tromey <tromey@redhat.com>
+
* jvspec.c (lang_specific_driver): Read spec file even if
-fsyntax-only.
diff --git a/gcc/java/jcf-write.c b/gcc/java/jcf-write.c
index aa4d33b..b68ec25 100644
--- a/gcc/java/jcf-write.c
+++ b/gcc/java/jcf-write.c
@@ -2651,10 +2651,14 @@ generate_bytecode_insns (tree exp, int target, struct jcf_partial *state)
if (TREE_CODE (f) != VOID_TYPE)
{
int size = TYPE_IS_WIDE (f) ? 2 : 1;
+ /* Always note the push here, so that we correctly
+ compute the required maximum stack size. */
+ NOTE_PUSH (size);
if (target == IGNORE_TARGET)
- emit_pop (size, state);
- else
- NOTE_PUSH (size);
+ {
+ emit_pop (size, state);
+ NOTE_POP (size);
+ }
}
break;
}