public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/16930] New: array store is optimized away
@ 2004-08-09 10:00 fw at deneb dot enyo dot de
  2004-08-09 10:04 ` [Bug java/16930] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: fw at deneb dot enyo dot de @ 2004-08-09 10:00 UTC (permalink / raw)
  To: java-prs

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug java/16930] array store is optimized away
  2004-08-09 10:00 [Bug java/16930] New: array store is optimized away fw at deneb dot enyo dot de
@ 2004-08-09 10:04 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-09 10:04 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-08-09 10:04 -------


*** This bug has been marked as a duplicate of 16867 ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-08-09 10:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-09 10:00 [Bug java/16930] New: array store is optimized away fw at deneb dot enyo dot de
2004-08-09 10:04 ` [Bug java/16930] " pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).