public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/24242]  New: Redundant null pointer checks generated on refrerences returned by new operator.
@ 2005-10-06 17:27 daney at gcc dot gnu dot org
  2005-10-06 17:35 ` [Bug java/24242] " pinskia at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: daney at gcc dot gnu dot org @ 2005-10-06 17:27 UTC (permalink / raw)
  To: java-prs

When examining the assembler output (compiled with -O2) from this class:

public class T
{
    Object f1()
    {
        Object o = new Object();

        return o.getClass();
    }
}

We see a check for a null return value from _Jv_AllocObjectNoFinalizer (i.e.
the new operator).

However _Jv_AllocObjectNoFinalizer always returns non-null values.  On
out-of-memory it throws an OutOfMemoryError


-- 
           Summary: Redundant null pointer checks generated on refrerences
                    returned by new operator.
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P2
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: daney 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=24242


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

end of thread, other threads:[~2013-10-11 11:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-24242-8172@http.gcc.gnu.org/bugzilla/>
2013-10-03 23:57 ` [Bug java/24242] Redundant null pointer checks generated on refrerences returned by new operator glisse at gcc dot gnu.org
2013-10-11 11:48 ` glisse at gcc dot gnu.org
2005-10-06 17:27 [Bug java/24242] New: " daney at gcc dot gnu dot org
2005-10-06 17:35 ` [Bug java/24242] " pinskia at gcc dot gnu dot org
2005-11-12 20:06 ` pinskia at gcc dot gnu dot org
2005-11-12 20:09 ` 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).