This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/19476] New: Missed null checking elimination with new


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]