This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/19476] New: Missed null checking elimination with new
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Jan 2005 04:54:12 -0000
- Subject: [Bug c++/19476] New: Missed null checking elimination with new
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
I don't know if I should place this in C++ or in tree-opt component but the following code still has a
null check even though it is know that the variable cannot be null as that should have thrown an
exception (yes this shows up in real code, this is reduced from PR 15855 sources):
struct Node { int i; };
struct SeqR11E0plus { int i2; };
struct SeqR11E0plus_1 : public SeqR11E0plus, public Node
{
SeqR11E0plus_1(void) throw();
};
Node* f(void)
{ Node* res = new SeqR11E0plus_1(); return res;}
--
Summary: Missed null checking elimination with new
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: enhancement
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19476