[Bug java/20044] New: Wrong method call semantics (maybe instanceof/invokespecial)

bonniot at users dot sf dot net gcc-bugzilla@gcc.gnu.org
Fri Feb 18 00:01:00 GMT 2005


This is a very small testcase, in which the code generated by gcj does not
behave correctly at runtime. I set the severity as critical because there is no
notification that something went wrong while the wrong method gets called, and I
see no workaround.

I suppose that there is a problem either with an instanceof test, or with the
implementation of invokespecial. Feel free to update the summary if this turns
out to be the wrong intuitition.

Attached are three small bytecode classes (I could not reproduce the bug from
Java sources).

# Normal behaviour, using Sun's JDK
$ java test.fun
true

$ gcj --main=test.fun test/*.class
$ ./a.out
false

Tested with gcj 4.0.0 20050212.

-- 
           Summary: Wrong method call semantics (maybe
                    instanceof/invokespecial)
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bonniot at users dot sf dot net
                CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
                    dot org
  GCC host triplet: i386-debian-linux-gnu


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



More information about the Java-prs mailing list