aboutsummaryrefslogtreecommitdiff
path: root/libjava/testsuite
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2005-01-24 14:34:19 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2005-01-24 14:34:19 +0000
commitd5f625555adfef72898749680608b2570a6cb293 (patch)
treee0a0cb7ef097bd8ede15923f72e3c49733beef0a /libjava/testsuite
parente930780c1eb7656f60a9e3d42ad5f91432fad363 (diff)
downloadgcc-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/testsuite')
-rw-r--r--libjava/testsuite/libjava.compile/PR19295.java16
1 files changed, 16 insertions, 0 deletions
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;
+}
+