This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug java/19295] New: Incorrect bytecode produced for bitwise AND
- From: "overholt at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Jan 2005 19:14:31 -0000
- Subject: [Bug java/19295] New: Incorrect bytecode produced for bitwise AND
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
This is a boiled-down test case from part of Eclipse. gcj produces this bytecode:
Method name:"isArrayType" public final Signature: ()boolean
Attribute "Code", length:35, max_stack:3, max_locals:1, code_length:11
0: aload_0
1: getfield <Field Test2.tagBits long>
4: i2l
which results in a verification failure because it's producing an i2l
instruction when there's a long on the stack.
gcj4 --version
gcj4 (GCC) 4.0.0 20041228 (Red Hat 4.0.0-0.17) (i686-pc-linux)
$ gcj4 -C Test2.java; gcj4 -findirect-dispatch -c Test2.class
Test2.java: In class 'Test2':
Test2.java: In method 'Test2.isArrayType()':
Test2.java:5: error: verification failed: incompatible type on stack
Test2.java:5: error: expected type 'int' but stack contains 'void'
Test2.java:5: confused by earlier errors, bailing out
--
Summary: Incorrect bytecode produced for bitwise AND
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: overholt at redhat dot com
CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19295