The following invalid code snippet triggers an ICE since at least GCC 2.95.3:

=======================================================
void* operator new (__SIZE_TYPE__) { return; }
=======================================================

bug.cc: In function 'void* operator new(unsigned int)':
bug.cc:1: error: return-statement with no value, in function returning 'void*'
bug.cc:1: internal compiler error: Segmentation fault
Please submit a full bug report, [etc.]


-- 
           Summary: ICE on invalid return from operator new
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, error-recovery, monitored
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org


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

Reply via email to