[Bug java/12739] New: gcj emits dead bytecode

jsturm at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Thu Oct 23 03:28:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12739

           Summary: gcj emits dead bytecode
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jsturm at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org

For the test case:

class T {
  int t() { try { return 0; } finally { } }
}

Compare the bytecode created with 3.2.2:

Method name:"t" Signature: 6=()int
Attribute "Code", length:26, max_stack:1, max_locals:1, code_length:2
  0: iconst_0
  1: ireturn

vs. current CVS:

Method name:"t" Signature: 6=()int
Attribute "Code", length:48, max_stack:2, max_locals:4, code_length:16
  0: iconst_0
  1: istore_1
  2: jsr 13
  5: iload_1
  6: ireturn
  7: astore_3
  8: jsr 13
 11: aload_3
 12: athrow
 13: astore_2
 14: ret 2
Exceptions (count: 1):
  start: 0, end: 7, handler: 7, type: 0 /* finally */

Probably caused by:

2003-09-03  Jeff Sturm  <jsturm@one-point.com>
        * parse.y: Include cgraph.h.
        (block): Don't special-case empty block production.



More information about the Gcc-bugs mailing list