http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57545
Bug ID: 57545
Summary: Generation of debug symbols leads to internal compiler
error
Product: gcc
Version: 4.8.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: [email protected]
Created attachment 30269
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30269&action=edit
test case leading to internal compiler error
Enabling the generation of debug symbols leads to an internal compiler error
(segmentation fault). A preprocessed minimal example is attached. The problem
is reproducible in g++ versions 4.7.2, 4.7.3, 4.8.0 and 4.8.1. Version 4.7.1 is
the last version where I did not encounter any problems.
// code
template<typename T, long unsigned int N>
struct array {
T data[N];
};
template<typename T>
struct derived {
typedef long unsigned int size_type;
static const size_type n = 42;
array<int, n> a;
};
// compile
$ g++ -g -Wall -Wextra -save-temps test-case.cpp
test-case.cpp:12:2: internal compiler error: Segmentation fault
};
^
0x89f8ff crash_signal
../../gcc-4.8.1/gcc/toplev.c:332
0x897567 bit_from_pos(tree_node*, tree_node*)
../../gcc-4.8.1/gcc/stor-layout.c:799
0x6ad653 field_byte_offset
../../gcc-4.8.1/gcc/dwarf2out.c:14351
0x6b72e9 add_data_member_location_attribute
../../gcc-4.8.1/gcc/dwarf2out.c:14577
0x6c3c89 gen_field_die
../../gcc-4.8.1/gcc/dwarf2out.c:18697
0x6bfa4f gen_decl_die
../../gcc-4.8.1/gcc/dwarf2out.c:20072
0x6c0d37 gen_member_die
../../gcc-4.8.1/gcc/dwarf2out.c:19031
0x6c0d37 gen_struct_or_union_type_die
../../gcc-4.8.1/gcc/dwarf2out.c:19117
0x6c0d37 gen_tagged_type_die
../../gcc-4.8.1/gcc/dwarf2out.c:19307
0x6c1a2e gen_type_die_with_usage
../../gcc-4.8.1/gcc/dwarf2out.c:19454
0x6c2142 gen_type_die
../../gcc-4.8.1/gcc/dwarf2out.c:19493
0x6c2142 modified_type_die
../../gcc-4.8.1/gcc/dwarf2out.c:10163
0x6c2f70 force_type_die
../../gcc-4.8.1/gcc/dwarf2out.c:19789
0x6c37f9 get_context_die
../../gcc-4.8.1/gcc/dwarf2out.c:19704
0x6c37f9 scope_die_for
../../gcc-4.8.1/gcc/dwarf2out.c:16419
0x6c15d9 gen_type_die_with_usage
../../gcc-4.8.1/gcc/dwarf2out.c:19349
0x6c2ebe gen_type_die
../../gcc-4.8.1/gcc/dwarf2out.c:19493
0x6c2ebe modified_type_die
../../gcc-4.8.1/gcc/dwarf2out.c:10095
0x6c3a2b add_type_attribute
../../gcc-4.8.1/gcc/dwarf2out.c:16497
0x6bad18 generic_parameter_die
../../gcc-4.8.1/gcc/dwarf2out.c:10356
$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/apps/gcc/gcc-4.8.1/libexec/gcc/x86_64-pc-linux-gnu/4.8.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-4.8.1/configure --prefix=/apps/gcc/gcc-4.8.1
--build=x86_64-pc-linux-gnu --enable-bootstrap --enable-checking=release
--enable-__cxa_atexit --enable-languages=c,c++,fortran --enable-libgomp
--enable-libmudflap --enable-lto --enable-multilib --enable-nls --enable-shared
--enable-threads=posix --with-system-zlib --enable-cloog-backend=isl
--with-cloog=/home/hpc/severin/apps/cloog/cloog-0.18.0
--with-cloog-include=/home/hpc/severin/apps/cloog/cloog-0.18.0/include/
--with-ppl=/home/hpc/severin/apps/ppl/ppl-1.0
Thread model: posix
gcc version 4.8.1 (GCC)