This is the mail archive of the
java-prs@gcc.gnu.org
mailing list for the Java project.
[Bug java/16930] New: array store is optimized away
- From: "fw at deneb dot enyo dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: java-prs at gcc dot gnu dot org
- Date: 9 Aug 2004 10:00:35 -0000
- Subject: [Bug java/16930] New: array store is optimized away
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following code prints "not okay" at optimization level -O1 and above:
public class ArrayReturnBug {
static String[] createArray() {
return new String[] { "Hi!" };
}
public static void main (String[] argv) {
String[] array = createArray();
if (array[0] != null) {
System.out.println("okay");
} else {
System.out.println("not okay");
}
}
}
The array store is removed during the cddce pass.
--
Summary: array store is optimized away
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: fw at deneb dot enyo dot de
CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16930