public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Daniel.Bonniot@inria.fr
To: gcc-gnats@gcc.gnu.org
Subject: java/5537: Error compiling simple bytecode with jsr
Date: Wed, 30 Jan 2002 04:26:00 -0000	[thread overview]
Message-ID: <20020130122046.31224.qmail@sources.redhat.com> (raw)


>Number:         5537
>Category:       java
>Synopsis:       Error compiling simple bytecode with jsr
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Wed Jan 30 04:26:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Daniel Bonniot
>Release:        3.0.3
>Organization:
>Environment:
Debian package gcj-3.0
Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,proto,objc --prefix=/usr --infodir=/share/info --mandir=/share/man --enable-shared --with-gnu-as --with-gnu-ld --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --disable-checking --enable-threads=posix --enable-java-gc=boehm --with-cpp-install-dir=bin --enable-objc-gc i386-linux
Thread model: posix
gcc version 3.0.3
>Description:
This case involves calling return in a try/finally block,
and compiling from bytecode.

public class A 
{
  public static void main(String[] args)
  {
    try{
      return;
    }
    finally{
    }
  }
}

gcj compiles correctly from source, but fails on the corresponding
bytecode (attached):
$ gcj A.class
A.java: In class `A':
A.java: In method `A.main(java.lang.String[])':
A.java:6: verification error at PC=8
A.java:6: loading local variable 1 which has unknown type

$ javap -c A.class
Compiled from A.java
public class A extends java.lang.Object {
    public A();
    public static void main(java.lang.String[]);
}

Method A()
   0 aload_0
   1 invokespecial #1 <Method java.lang.Object()>
   4 return

Method void main(java.lang.String[])
   0 jsr 10
   3 return
   4 astore_1
   5 jsr 10
   8 aload_1
   9 athrow
  10 astore_2
  11 ret 2
Exception table:
   from   to  target type
     0     4     4   any
>How-To-Repeat:
gcj A.class
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/x-java-vm; name="A.class"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="A.class"

yv66vgADAC0ADwoAAwAMBwANBwAOAQAGPGluaXQ+AQADKClWAQAEQ29kZQEAD0xpbmVOdW1iZXJU
YWJsZQEABG1haW4BABYoW0xqYXZhL2xhbmcvU3RyaW5nOylWAQAKU291cmNlRmlsZQEABkEuamF2
YQwABAAFAQABQQEAEGphdmEvbGFuZy9PYmplY3QAIQACAAMAAAAAAAIAAQAEAAUAAQAGAAAAHQAB
AAEAAAAFKrcAAbEAAAABAAcAAAAGAAEAAAABAAkACAAJAAEABgAAADEAAQADAAAADagACrFMqAAF
K79NqQIAAQAAAAQABAAAAAEABwAAAAoAAgAAAAYABAAIAAEACgAAAAIACw==


             reply	other threads:[~2002-01-30 12:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-30  4:26 Daniel.Bonniot [this message]
2002-01-30 15:36 Tom Tromey
2002-01-31  2:06 Daniel Bonniot
2002-10-08  1:06 Daniel Bonniot
2003-05-12 19:21 Dara Hazeghi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020130122046.31224.qmail@sources.redhat.com \
    --to=daniel.bonniot@inria.fr \
    --cc=gcc-gnats@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).