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]

g++ ICE in expr.c:store_expr (g++ 2.96 20000327 on i686-pc-linux-gnu)



hi -

The current cvs version of g++ (2.96 20000320 on i686-pc-linux-gnu)
gets an ICE on the following input if -O2 is used:

--------------------------------------------------------------
class AA {};

void fee (const AA&);

    class basic_string
    {
    public:
      basic_string(const char*);

      ~basic_string() 
      { fee (this->get_allocator()); }

      AA get_allocator();
  };


class failure
{
public:
  failure(const basic_string& __str);
};


class foo
    {
    public:
      foo(int x)
      {
        throw failure ("");
      }
    };





void test05()
{
  foo ofs(0);
}


--------------------------------------------------------------


$ ./cc1plus -O2 x.cc
void test05 ()
x.cc:11: Internal compiler error.
x.cc:11: Please submit a full bug report.
x.cc:11: See <URL:http://www.gnu.org/software/gcc/bugs.html> for
x.cc:11: instructions.


Here's where it's crashing:


Program received signal SIGSEGV, Segmentation fault.
store_expr (exp=0x0, target=0x40132e70, want_value=0)
    at ../../egcs/gcc/expr.c:3658
3658      if (TREE_CODE (exp) == COMPOUND_EXPR)
(gdb) where
#0  store_expr (exp=0x0, target=0x40132e70, want_value=0)
    at ../../egcs/gcc/expr.c:3658
#1  0x8083a12 in expand_expr (exp=0x40130f80, target=0x40132e70, 
    tmode=VOIDmode, modifier=EXPAND_CONST_ADDRESS)
    at ../../egcs/gcc/expr.c:8083
#2  0x8083d53 in expand_expr (exp=0x40130f60, target=0x0, tmode=VOIDmode, 
    modifier=EXPAND_NORMAL) at ../../egcs/gcc/expr.c:8218
#3  0x8081c4d in expand_expr (exp=0x40130f40, target=0x0, tmode=VOIDmode, 
    modifier=EXPAND_NORMAL) at ../../egcs/gcc/expr.c:7073
#4  0x8081c4d in expand_expr (exp=0x40130f20, target=0x0, tmode=VOIDmode, 
    modifier=EXPAND_NORMAL) at ../../egcs/gcc/expr.c:7073
#5  0x808a4d6 in store_one_arg (arg=0xbfffe340, argblock=0x0, may_be_alloca=0, 
    variable_size=0, reg_parm_stack_space=0) at ../../egcs/gcc/calls.c:3971
#6  0x80892a0 in expand_call (exp=0x40130ec0, target=0x0, ignore=0)
    at ../../egcs/gcc/calls.c:2639
#7  0x8081ad9 in expand_expr (exp=0x40130ec0, target=0x0, tmode=VOIDmode, 
    modifier=EXPAND_NORMAL) at ../../egcs/gcc/expr.c:7023
#8  0x806fdb2 in expand_expr_stmt (exp=0x40130ec0)
    at ../../egcs/gcc/stmt.c:1866
#9  0x8257615 in finish_expr_stmt (expr=0x40130ec0)
    at ../../../egcs/gcc/cp/semantics.c:155
#10 0x825a5b0 in expand_stmt (t=0x40130d00)
    at ../../../egcs/gcc/cp/semantics.c:2369
#11 0x825a830 in expand_stmt (t=0x40130a40)
    at ../../../egcs/gcc/cp/semantics.c:2478
#12 0x82063d7 in cplus_expand_expr (exp=0x40130a20, target=0x0, 
    tmode=VOIDmode, modifier=EXPAND_NORMAL) at ../../../egcs/gcc/cp/expr.c:147
#13 0x80842a8 in expand_expr (exp=0x40130a20, target=0x0, tmode=VOIDmode, 
    modifier=EXPAND_NORMAL) at ../../egcs/gcc/expr.c:8449
#14 0x8080244 in expand_expr (exp=0x40130a00, target=0x0, tmode=VOIDmode, 
    modifier=EXPAND_NORMAL) at ../../egcs/gcc/expr.c:6051
#15 0x808046f in expand_expr (exp=0x40135440, target=0x0, tmode=VOIDmode, 
    modifier=EXPAND_NORMAL) at ../../egcs/gcc/expr.c:6144
#16 0x807675e in emit_cleanup_handler (entry=0x8316c78)
    at ../../egcs/gcc/except.c:1853
#17 0x807627e in expand_eh_region_end (handler=0x40135440)
    at ../../egcs/gcc/except.c:1579
#18 0x8072946 in expand_cleanups (list=0x40135460, dont_do=0x0, in_fixup=0, 
    reachable=1) at ../../egcs/gcc/stmt.c:4283
#19 0x8071db3 in expand_end_bindings (vars=0x0, mark_ends=0, dont_jump_in=0)
    at ../../egcs/gcc/stmt.c:3677
#20 0x8071811 in expand_end_target_temps () at ../../egcs/gcc/stmt.c:3301
#21 0x8257644 in finish_expr_stmt (expr=0x4012d060)
    at ../../../egcs/gcc/cp/semantics.c:158
#22 0x825a5b0 in expand_stmt (t=0x4012cfa0)
    at ../../../egcs/gcc/cp/semantics.c:2369
#23 0x825a830 in expand_stmt (t=0x4012cf80)
    at ../../../egcs/gcc/cp/semantics.c:2478
#24 0x82063d7 in cplus_expand_expr (exp=0x4012cf60, target=0x0, 
    tmode=VOIDmode, modifier=EXPAND_NORMAL) at ../../../egcs/gcc/cp/expr.c:147
#25 0x80842a8 in expand_expr (exp=0x4012cf60, target=0x0, tmode=VOIDmode, 
    modifier=EXPAND_NORMAL) at ../../egcs/gcc/expr.c:8449
#26 0x82063b0 in cplus_expand_expr (exp=0x4012cf40, target=0x0, 
    tmode=VOIDmode, modifier=EXPAND_NORMAL) at ../../../egcs/gcc/cp/expr.c:136
#27 0x80842a8 in expand_expr (exp=0x4012cf40, target=0x0, tmode=VOIDmode, 
    modifier=EXPAND_NORMAL) at ../../egcs/gcc/expr.c:8449
#28 0x806fdb2 in expand_expr_stmt (exp=0x4012cf40)
    at ../../egcs/gcc/stmt.c:1866
#29 0x8257615 in finish_expr_stmt (expr=0x4012cf40)
    at ../../../egcs/gcc/cp/semantics.c:155
#30 0x825a5b0 in expand_stmt (t=0x4012cd60)
    at ../../../egcs/gcc/cp/semantics.c:2369
#31 0x825a830 in expand_stmt (t=0x4012cc60)
    at ../../../egcs/gcc/cp/semantics.c:2478
#32 0x82063d7 in cplus_expand_expr (exp=0x4012cb80, target=0x0, 
    tmode=VOIDmode, modifier=EXPAND_NORMAL) at ../../../egcs/gcc/cp/expr.c:147
#33 0x80842a8 in expand_expr (exp=0x4012cb80, target=0x0, tmode=VOIDmode, 
    modifier=EXPAND_NORMAL) at ../../egcs/gcc/expr.c:8449
#34 0x8080244 in expand_expr (exp=0x4012da20, target=0x0, tmode=VOIDmode, 
    modifier=EXPAND_NORMAL) at ../../egcs/gcc/expr.c:6051
#35 0x806fdb2 in expand_expr_stmt (exp=0x4012da20)
    at ../../egcs/gcc/stmt.c:1866
#36 0x8257615 in finish_expr_stmt (expr=0x4012da20)
    at ../../../egcs/gcc/cp/semantics.c:155
#37 0x825a5b0 in expand_stmt (t=0x4012cac0)
    at ../../../egcs/gcc/cp/semantics.c:2369
#38 0x825a830 in expand_stmt (t=0x4012c7c0)
    at ../../../egcs/gcc/cp/semantics.c:2478
#39 0x82063d7 in cplus_expand_expr (exp=0x4012cae0, target=0x0, 
    tmode=VOIDmode, modifier=EXPAND_NORMAL) at ../../../egcs/gcc/cp/expr.c:147
#40 0x80842a8 in expand_expr (exp=0x4012cae0, target=0x0, tmode=VOIDmode, 
    modifier=EXPAND_NORMAL) at ../../egcs/gcc/expr.c:8449
#41 0x806fdb2 in expand_expr_stmt (exp=0x4012cae0)
    at ../../egcs/gcc/stmt.c:1866
#42 0x8257615 in finish_expr_stmt (expr=0x4012cae0)
    at ../../../egcs/gcc/cp/semantics.c:155
#43 0x825a5b0 in expand_stmt (t=0x4012c280)
    at ../../../egcs/gcc/cp/semantics.c:2369
#44 0x825a830 in expand_stmt (t=0x4012c260)
    at ../../../egcs/gcc/cp/semantics.c:2478
#45 0x825ad2c in expand_body (fn=0x4012a600)
    at ../../../egcs/gcc/cp/semantics.c:2781
#46 0x823236f in yyparse () at parse.y:737
#47 0x804bb3b in compile_file (name=0x4011b5f8 "x.cc")
    at ../../egcs/gcc/toplev.c:2451
#48 0x804f589 in main (argc=3, argv=0xbffffc34) at ../../egcs/gcc/toplev.c:4935



thanks,
sss

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