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]

Re: c++/10635: ICE (segfault) when dereferencing an incomplete type casted from a void pointer


Old Synopsis: g++ seg faluts on compile command
New Synopsis: ICE (segfault) when dereferencing an incomplete type casted from a void pointer

State-Changed-From-To: open->analyzed
State-Changed-By: bajo
State-Changed-When: Tue May  6 10:43:57 2003
State-Changed-Why:
    Confirmed, it ICEs 3.3 CVS 20030503 and 3.4 CVS 20030503.
    
    ------------------------------------------------------
    struct INCOMPLETE;
    
    void* foo(void);
    
    struct Foo
    {
        void get_incomplete(INCOMPLETE );
        
        void bar(void)
        {
            get_incomplete((INCOMPLETE) *((INCOMPLETE*)foo())); 
        }
    };
    ------------------------------------------------------
    pr10635.cpp: In member function `void Foo::bar()':
    pr10635.cpp:11: internal compiler error: Segmentation fault
    
    The code is illegal because it is trying to use an
    incomplete type (in the original code: QDateTime was not
    yet defined when TimeLabel::qt_invoke() is compiled,
    probably it's just a matter of including one more header).
    
    Not a regression: 2.95 had an accept-illegal on this, so
    it's slightly better now, the code is rejected (even if not
    gracefully).

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10635


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