This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/20649] New: Segmentation fault in decl_function_context (tree.c:5116)
- From: "aj at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Mar 2005 19:35:45 -0000
- Subject: [Bug c/20649] New: Segmentation fault in decl_function_context (tree.c:5116)
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Compiling glibc on i686 with GCC 4.0 CVS 20050325 I get this segmentation fault
compiling the testsuite:
/opt/gcc/4.0-devel/libexec/gcc/i686-suse-linux-gnu/4.0.0/cc1 -fpreprocessed
inl-tester.i -quiet -dumpbase inl-tester.c -mpreferred-stack-boundary=2
-mtune=pentiumpro -auxbase-strip /home/aj/builds/glibc/string/inl-tester.o -g
-O2 -Wall -Winline -Wstrict-prototypes -Wwrite-strings -std=gnu99 -version -o
inl-tester.s
GNU C version 4.0.0 20050325 (prerelease) (i686-suse-linux-gnu)
compiled by GNU C version 4.0.0 20050325 (prerelease).
GGC heuristics: --param ggc-min-expand=63 --param ggc-min-heapsize=63397
tester.c: In function ‘test_stpncpy’:
tester.c:279: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Using gdb I get the following stacktrace:
Program received signal SIGSEGV, Segmentation fault.
decl_function_context (decl=0x0) at /home/aj/cvs/gcc-4_0-branch/gcc/tree.c:5116
5116 if (TREE_CODE (decl) == ERROR_MARK)
(gdb) bt
#0 decl_function_context (decl=0x0)
at /home/aj/cvs/gcc-4_0-branch/gcc/tree.c:5116
#1 0x08140c3d in gen_decl_die (decl=<value optimized out>,
context_die=0x4180ed34)
at /home/aj/cvs/gcc-4_0-branch/gcc/dwarf2out.c:10502
#2 0x081440ef in decls_for_scope (stmt=0x417e8ccc, context_die=0x4180ed34,
depth=2)
at /home/aj/cvs/gcc-4_0-branch/gcc/dwarf2out.c:12404
#3 0x08144280 in gen_lexical_block_die (stmt=0x417e8ccc, context_die=0x0,
depth=2)
at /home/aj/cvs/gcc-4_0-branch/gcc/dwarf2out.c:11647
#4 0x08143e60 in gen_block_die (stmt=0x417e8ccc, context_die=0x4180ebfc,
depth=2)
at /home/aj/cvs/gcc-4_0-branch/gcc/dwarf2out.c:12365
#5 0x0814417b in decls_for_scope (stmt=<value optimized out>,
context_die=0x4180ebfc, depth=1)
at /home/aj/cvs/gcc-4_0-branch/gcc/dwarf2out.c:12417
#6 0x08143fd8 in gen_block_die (stmt=0x417e8c98, context_die=0x4180eb60,
depth=1)
at /home/aj/cvs/gcc-4_0-branch/gcc/dwarf2out.c:11676
#7 0x0814417b in decls_for_scope (stmt=<value optimized out>,
context_die=0x4180eb60, depth=0)
at /home/aj/cvs/gcc-4_0-branch/gcc/dwarf2out.c:12417
#8 0x08142bb6 in gen_subprogram_die (decl=0x40b5b21c, context_die=0x0)
at /home/aj/cvs/gcc-4_0-branch/gcc/dwarf2out.c:11475
#9 0x081405c1 in gen_decl_die (decl=0x40b5b21c, context_die=0x401f58f0)
at /home/aj/cvs/gcc-4_0-branch/gcc/dwarf2out.c:12682
#10 0x082e4507 in rest_of_compilation ()
at /home/aj/cvs/gcc-4_0-branch/gcc/passes.c:334
#11 0x0809d9ad in execute_pass_list (pass=0x84335e0)
at /home/aj/cvs/gcc-4_0-branch/gcc/tree-optimize.c:533
#12 0x0809dc4b in tree_rest_of_compilation (fndecl=0x40b5b21c)
at /home/aj/cvs/gcc-4_0-branch/gcc/tree-optimize.c:668
#13 0x0805a526 in c_expand_body (fndecl=0x40b5b21c)
at /home/aj/cvs/gcc-4_0-branch/gcc/c-decl.c:6439
#14 0x08309433 in cgraph_expand_function (node=0x40b5e8dc)
at /home/aj/cvs/gcc-4_0-branch/gcc/cgraphunit.c:833
#15 0x08309e6d in cgraph_optimize ()
at /home/aj/cvs/gcc-4_0-branch/gcc/cgraphunit.c:1698
#16 0x082caa48 in toplev_main (argc=0, argv=0xbfffef44)
at /home/aj/cvs/gcc-4_0-branch/gcc/toplev.c:1009
#17 0x40046e80 in __libc_start_main () from /lib/tls/libc.so.6
#18 0x08049aa1 in _start () at start.S:119
--
Summary: Segmentation fault in decl_function_context
(tree.c:5116)
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: aj at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-linux-gnu
GCC host triplet: i686-linux-gnu
GCC target triplet: i686-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20649