gcc version 4.1.0 20050313 (experimental) crash at invalid C++ code:

test.cc:3: error: invalid use of undefined type 'struct C'
test.cc:1: error: forward declaration of 'struct C'
test.cc: In constructor 'C::C()':
test.cc:3: error: class 'C' does not have any field named 'f'
test.cc:3: internal compiler error: Segmentation fault

Testcase:

--8X----------------------------
class C;

C::C() : f() {}
--X8----------------------------

-- 
           Summary: ICE at  "class 'C' does not have any field named 'f'"
                    error
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: wanderer at rsu dot ru
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i386-unknown-freebsd5.3
  GCC host triplet: i386-unknown-freebsd5.3
GCC target triplet: i386-unknown-freebsd5.3


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

Reply via email to