public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/10481: [3.3?/3.4 regression] Invalid use of non-static data member causes ICE.
@ 2003-04-24 13:57 bangerth
  0 siblings, 0 replies; only message in thread
From: bangerth @ 2003-04-24 13:57 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, mmitchel, nobody, redi

Old Synopsis: Invalid use of non-static data member causes ICE.
New Synopsis: [3.3?/3.4 regression] Invalid use of non-static data member causes ICE.

Responsible-Changed-From-To: unassigned->mmitchel
Responsible-Changed-By: bangerth
Responsible-Changed-When: Thu Apr 24 13:57:41 2003
Responsible-Changed-Why:
    I think you worked in this area recently when you fixed this
      type `A' is not a base type for type `B'
    problem.
State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Thu Apr 24 13:57:41 2003
State-Changed-Why:
    Confirmed.
    ------------------
    struct A {
        char a;
    };
    
    struct B {
        void f() {
          A::a;
        }
    };
    ---------------------
    
    g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.cc
    x.cc: In member function `void B::f()':
    x.cc:7: internal compiler error: Segmentation fault
    
    I can't presently tell whether 3.3 ICEs, since my version
    is a couple of days old. I really should update...
    
    The error happens here:
    (gdb) bt
    #0  finish_non_static_data_member (decl=0x401a0654, 
        qualifying_scope=0x401a03cc) at ../../gcc-3.4-CVS/gcc/cp/semantics.c:1219
    #1  0x080fa827 in cp_parser_postfix_expression (parser=0x401a2f40, 
        address_p=false) at ../../gcc-3.4-CVS/gcc/cp/parser.c:3824
    #2  0x080fb050 in cp_parser_unary_expression (parser=0x401a2f40, 
        address_p=false) at ../../gcc-3.4-CVS/gcc/cp/parser.c:4499
    #3  0x080fb9fc in cp_parser_pm_expression (parser=0x401a2f40)
        at ../../gcc-3.4-CVS/gcc/cp/parser.c:4952
    #4  0x08104c82 in cp_parser_binary_expression (parser=0x401a2f40, 
        token_tree_map=0x8474fc0, fn=0x80fb9e0 <cp_parser_pm_expression>)
        at ../../gcc-3.4-CVS/gcc/cp/parser.c:13571
    
    which is the inner while loop here:
          while (!DERIVED_FROM_P (context_for_name_lookup (decl), access_type))
    	{
    	  access_type = TYPE_CONTEXT (access_type);
    	  while (DECL_P (access_type))
    	    access_type = DECL_CONTEXT (access_type);
    	}
    It ICEs since access_type==0. This code hasn't been
    changed recently, just as the one one frame higher, so
    I can't pinpoint a certain patch.
    
    W.

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


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

only message in thread, other threads:[~2003-04-24 13:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-24 13:57 c++/10481: [3.3?/3.4 regression] Invalid use of non-static data member causes ICE bangerth

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).