This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
-g causing ICE during bootstrap of mainline in libstdc++-v3
- From: Phil Edwards <phil at jaj dot com>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 20 Jan 2003 12:56:51 -0500
- Subject: -g causing ICE during bootstrap of mainline in libstdc++-v3
The first target file built, libsupc++/del_op.cc, causes a segfault.
This is using sources from about an hour ago. I've narrowed it down to
the presence of -g. Some debugger information follows.
The backtrace:
#0 lookup_filename (file_name=0x84f5b08 "del_op.ii") at /home/pme/src/unified/gcc/dwarf2out.c:12336
#1 0x08168eb7 in add_src_coords_attributes (die=0x4015b814, decl=0x401625b0) at /home/pme/src/unified/gcc/dwarf2out.c:10036
#2 0x08169dda in gen_enumeration_type_die (type=0x40162540, context_die=0x0) at /home/pme/src/unified/gcc/dwarf2out.c:10485
#3 0x0816dcde in gen_type_die (type=0x40162540, context_die=0x0) at /home/pme/src/unified/gcc/dwarf2out.c:11722
#4 0x0816e96c in dwarf2out_decl (decl=0x401625b0) at /home/pme/src/unified/gcc/dwarf2out.c:12254
#5 0x082d9ece in rest_of_type_compilation (type=0x40162540, toplev=1) at /home/pme/src/unified/gcc/toplev.c:2370
#6 0x0807459a in finish_enum (enumtype=0x40162540) at /home/pme/src/unified/gcc/cp/decl.c:13170
#7 0x080f93d6 in register_reflection_types () at /home/pme/src/unified/gcc/cp/cp-reflection.def:100
#8 0x080c88c4 in cxx_init (filename=0x84f5b08 "del_op.ii") at /home/pme/src/unified/gcc/cp/lex.c:457
#9 0x082de3cf in lang_dependent_init (name=0xbffffa8d "del_op.ii") at /home/pme/src/unified/gcc/toplev.c:5255
#10 0x082de61e in do_compile () at /home/pme/src/unified/gcc/toplev.c:5390
#11 0x082de6e9 in toplev_main (argc=3, argv=0xbffff944) at /home/pme/src/unified/gcc/toplev.c:5421
#12 0x081313df in main (argc=3, argv=0xbffff944) at /home/pme/src/unified/gcc/main.c:37
The variables:
(gdb) info locals
i = 20
n = 0
save_file_name = 0x0
(gdb) info args
file_name = 0x84f5b08 "del_op.ii"
(gdb)
The location, according to GDB, is dwarf2out.c:12336, which reads
n = VARRAY_ACTIVE_SIZE (file_table);
VARRAY_ACTIVE_SIZE is a macro which dereferences its argument, and file_table
is a NULL pointer. Boom.