optimization/7507: [3.2/3.3 regression] ICE (segfault) with -O2
Wolfgang Bangerth
bangerth@ticam.utexas.edu
Thu Nov 28 13:13:00 GMT 2002
To be more specific about the SegFault Volker just found: it is here:
Program received signal SIGSEGV, Segmentation fault.
cached_make_edge (edge_cache=0x0, src=0x83e5d74, dst=0x0, flags=0)
at ../../gcc-3.2-CVS/gcc/cfg.c:307
(gdb) bt
#0 cached_make_edge (edge_cache=0x0, src=0x83e5d74, dst=0x0, flags=0)
at ../../gcc-3.2-CVS/gcc/cfg.c:307
#1 0x08207655 in make_edges (label_value_list=0x0, min=0, max=3, update_p=1)
at ../../gcc-3.2-CVS/gcc/cfgbuild.c:403
#2 0x08207b9e in find_basic_blocks (f=0x401ae120, nregs=66, file=0x0)
at ../../gcc-3.2-CVS/gcc/cfgbuild.c:663
#3 0x081d9dab in rest_of_compilation (decl=0x401ada80)
at ../../gcc-3.2-CVS/gcc/toplev.c:2639
#4 0x08059bb3 in c_expand_body (fndecl=0x401ada80, nested_p=0,
can_defer_p=1)
at ../../gcc-3.2-CVS/gcc/c-decl.c:7056
#5 0x08059977 in finish_function (nested=0, can_defer_p=0)
at ../../gcc-3.2-CVS/gcc/c-decl.c:6923
#6 0x0804a04a in yyparse_1 () at c-parse.y:386
#7 0x081d9424 in compile_file () at ../../gcc-3.2-CVS/gcc/toplev.c:2124
#8 0x081de0b9 in do_compile () at ../../gcc-3.2-CVS/gcc/toplev.c:5218
#9 0x081de129 in toplev_main (argc=0, argv=0x0)
at ../../gcc-3.2-CVS/gcc/toplev.c:5250
#10 0x08080e4b in main (argc=0, argv=0x0) at ../../gcc-3.2-CVS/gcc/main.c:35
One would think that this is not target-specific, but it seems otherwise.
The code in question is
(gdb) fr 0
#0 cached_make_edge (edge_cache=0x0, src=0x83e5d74, dst=0x0, flags=0)
at ../../gcc-3.2-CVS/gcc/cfg.c:307
else
{
e = (edge) obstack_alloc (&flow_obstack, sizeof *e);
memset (e, 0, sizeof *e);
}
n_edges++;
e->succ_next = src->succ;
e->pred_next = dst->pred; <<<<<<<<<<<<
e->src = src;
e->dest = dst;
e->flags = flags;
src->succ = e;
because
(gdb) p *e
$1 = {pred_next = 0x0, succ_next = 0x0, src = 0x83e5d74, dest = 0x0,
insns = 0x0, aux = 0x0, flags = 0, probability = 0, count = 0}
Regards
Wolfgang
-------------------------------------------------------------------------
Wolfgang Bangerth email: bangerth@ticam.utexas.edu
www: http://www.ticam.utexas.edu/~bangerth
More information about the Gcc-bugs
mailing list