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; 6+ 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] 6+ messages in thread
* [Bug java/24242] Redundant null pointer checks generated on refrerences returned by new operator.
2005-10-06 17:27 [Bug java/24242] New: Redundant null pointer checks generated on refrerences returned by new operator daney at gcc dot gnu dot org
@ 2005-10-06 17:35 ` 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
2 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-06 17:35 UTC (permalink / raw)
To: java-prs
------- Comment #1 from pinskia at gcc dot gnu dot org 2005-10-06 17:35 -------
Confirmed, just like the example in PR 19476 for the C++ case.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
BugsThisDependsOn| |19476, 20318
Severity|normal |enhancement
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2005-10-06 17:35:53
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24242
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug java/24242] Redundant null pointer checks generated on refrerences returned by new operator.
2005-10-06 17:27 [Bug java/24242] New: Redundant null pointer checks generated on refrerences returned by new operator 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
2 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-12 20:06 UTC (permalink / raw)
To: java-prs
------- Comment #2 from pinskia at gcc dot gnu dot org 2005-11-12 20:06 -------
Will look into marking _Jv_AllocObjectNoFinalizer with the non zero attribute
which is added with PR 20318.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pinskia at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24242
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug java/24242] Redundant null pointer checks generated on refrerences returned by new operator.
2005-10-06 17:27 [Bug java/24242] New: Redundant null pointer checks generated on refrerences returned by new operator 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
2 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-12 20:09 UTC (permalink / raw)
To: java-prs
------- Comment #3 from pinskia at gcc dot gnu dot org 2005-11-12 20:09 -------
This is actually a dup of bug 21856.
*** This bug has been marked as a duplicate of 21856 ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24242
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug java/24242] Redundant null pointer checks generated on refrerences returned by new operator.
[not found] <bug-24242-8172@http.gcc.gnu.org/bugzilla/>
2013-10-03 23:57 ` glisse at gcc dot gnu.org
@ 2013-10-11 11:48 ` glisse at gcc dot gnu.org
1 sibling, 0 replies; 6+ messages in thread
From: glisse at gcc dot gnu.org @ 2013-10-11 11:48 UTC (permalink / raw)
To: java-prs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24242
Bug 24242 depends on bug 20318, which changed state.
Bug 20318 Summary: RFE: add attribute to specify that a function never returns NULL
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20318
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug java/24242] Redundant null pointer checks generated on refrerences returned by new operator.
[not found] <bug-24242-8172@http.gcc.gnu.org/bugzilla/>
@ 2013-10-03 23:57 ` glisse at gcc dot gnu.org
2013-10-11 11:48 ` glisse at gcc dot gnu.org
1 sibling, 0 replies; 6+ messages in thread
From: glisse at gcc dot gnu.org @ 2013-10-03 23:57 UTC (permalink / raw)
To: java-prs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24242
Bug 24242 depends on bug 19476, which changed state.
Bug 19476 Summary: Missed null checking elimination with new
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19476
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-10-11 11:48 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-06 17:27 [Bug java/24242] New: Redundant null pointer checks generated on refrerences returned by new operator 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
[not found] <bug-24242-8172@http.gcc.gnu.org/bugzilla/>
2013-10-03 23:57 ` glisse at gcc dot gnu.org
2013-10-11 11:48 ` glisse at gcc dot gnu.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).