public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/10635: ICE (segfault) when dereferencing an incomplete type casted from a void pointer
@ 2003-05-06 10:43 giovannibajo
  0 siblings, 0 replies; only message in thread
From: giovannibajo @ 2003-05-06 10:43 UTC (permalink / raw)
  To: Shea.Williams, gcc-bugs, gcc-prs, nobody

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-05-06 10:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-06 10:43 c++/10635: ICE (segfault) when dereferencing an incomplete type casted from a void pointer giovannibajo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).