diff options
author | Roger Sayle <roger@eyesopen.com> | 2005-01-24 14:34:19 +0000 |
---|---|---|
committer | Roger Sayle <sayle@gcc.gnu.org> | 2005-01-24 14:34:19 +0000 |
commit | d5f625555adfef72898749680608b2570a6cb293 (patch) | |
tree | e0a0cb7ef097bd8ede15923f72e3c49733beef0a /libjava | |
parent | e930780c1eb7656f60a9e3d42ad5f91432fad363 (diff) | |
download | gcc-d5f625555adfef72898749680608b2570a6cb293.zip gcc-d5f625555adfef72898749680608b2570a6cb293.tar.gz gcc-d5f625555adfef72898749680608b2570a6cb293.tar.bz2 |
re PR java/19295 (Incorrect bytecode produced for bitwise AND)
PR java/19295
* jcf-write.c (generate_bytecode_insns): Conversions between
integer types of the same precision shouldn't generate widening
or narrowing conversion bytecodes.
* testsuite/libjava.compile/PR19295.java: New test case.
From-SVN: r94162
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 5 | ||||
-rw-r--r-- | libjava/testsuite/libjava.compile/PR19295.java | 16 |
2 files changed, 21 insertions, 0 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 5bab104..86447b9 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +2005-01-24 Roger Sayle <roger@eyesopen.com> + + PR java/19295 + * testsuite/libjava.compile/PR19295.java: New test case. + 2005-01-19 Tom Tromey <tromey@redhat.com> * java/lang/VMCompiler.java (compileClass): Ignore UnknownError. diff --git a/libjava/testsuite/libjava.compile/PR19295.java b/libjava/testsuite/libjava.compile/PR19295.java new file mode 100644 index 0000000..336f7e9 --- /dev/null +++ b/libjava/testsuite/libjava.compile/PR19295.java @@ -0,0 +1,16 @@ +public class PR19295 implements myInterface { + public long tagBits = 0; + + public final boolean isArrayType() { + return (tagBits & IsArrayType) != 0; + } +} + +abstract class blah { + public final static int Bit1 = 0x2; +} + +interface myInterface { + long IsArrayType = blah.Bit1; +} + |