Skip to content

Commit

Permalink
gcc/java
Browse files Browse the repository at this point in the history
	PR java/29013:
	* jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Always note
	the push of the called method's return result.
libjava
	PR java/29013:
	* testsuite/libjava.lang/PR29013.out: Likewise.
	* testsuite/libjava.lang/PR29013.java: New file.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116902 138bc75d-0d04-0410-961f-82ee72b054a4
  • Loading branch information
tromey committed Sep 12, 2006
1 parent 7c3fa44 commit d7bec15
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 3 deletions.
6 changes: 6 additions & 0 deletions gcc/java/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2006-09-12 Tom Tromey <[email protected]>

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 <[email protected]>

* jvspec.c (lang_specific_driver): Read spec file even if
Expand Down
10 changes: 7 additions & 3 deletions gcc/java/jcf-write.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
6 changes: 6 additions & 0 deletions libjava/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2006-09-12 Tom Tromey <[email protected]>

PR java/29013:
* testsuite/libjava.lang/PR29013.out: Likewise.
* testsuite/libjava.lang/PR29013.java: New file.

2006-09-12 Tom Tromey <[email protected]>

* testsuite/libjava.jacks/jacks.exp (load_gcc_lib): Removed.
Expand Down
9 changes: 9 additions & 0 deletions libjava/testsuite/libjava.lang/PR29013.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
public class PR29013 {
public static int result() { return 5; }

public static void computeResult() { result(); }

public static void main(String[] args) {
computeResult();
}
}
Empty file.

0 comments on commit d7bec15

Please sign in to comment.