compiling with '-g' option causes 'internal compiler error' (g++: devel/c++-modules branch)

SAIFI saifi@strikr.io
Tue Aug 11 17:35:21 GMT 2020


Hi:

Have built devel/c++-modules branch and 
been able to successfully compile code 
written using C++ module constructs.

g++ -std=c++20 -fmodules-ts hello.cc hello_test.cc

However, if i introduce the debug flag 
'-g', a internal compiler error is seen.

g++ -std=c++20 -g -fmodules-ts hello.cc hello_test.cc

hello_test.cc:int main():
hello_test.cc:6:7:internal compiler error: gen_typedef_die, at dwarf2out.c:25369
greet ("Strikr Free Software Community");

0x72d835 gen_typedef_die
 	../../../../src/gcc/gcc/dwarf2out.c:25369
0x72d835 gen_typedef_die
 	../../../../src/gcc/gcc/dwarf2out.c:25341
0xca954a gen_decl_die
 	../../../../src/gcc/gcc/dwarf2out.c:26365
0xcab765 gen_member_die
 	../../../../src/gcc/gcc/dwarf2out.c:25184
0xcab765 gen_struct_or_union_type_die
 	../../../../src/gcc/gcc/dwarf2out.c:25280
0xcab765 gen_tagged_type_die
 	../../../../src/gcc/gcc/dwarf2out.c:25481
0xcc7279 gen_tagged_type_die
 	../../../../src/gcc/gcc/dwarf2out.c:25435
0xcc7279 gen_typedef_die
 	../../../../src/gcc/gcc/dwarf2out.c:25395
0xcc7279 gen_typedef_die
 	../../../../src/gcc/gcc/dwarf2out.c:25341
0xca954a gen_decl_die
 	../../../../src/gcc/gcc/dwarf2out.c:26365
0xcae076 gen_type_die
 	../../../../src/gcc/gcc/dwarf2out.c:25730
0xca9012 gen_decl_die
 	../../../../src/gcc/gcc/dwarf2out.c:26362
0xcaa213 dwarf2out_decl
 	../../../../src/gcc/gcc/dwarf2out.c:26910
0xcaa7d1 dwarf2out_type_decl
 	../../../../src/gcc/gcc/dwarf2out.c:26635
0xcaa7d1 dwarf2out_type_decl
 	../../../../src/gcc/gcc/dwarf2out.c:26630
0xf69cc4 rest_of_type_compilation(tree_node*, int)
 	../../../../src/gcc/gcc/passes.c:339
0x9f5a54 trees_in::read_class_def(tree_node*, tree_node*)
 	../../../../src/gcc/gcc/cp/module.cc:11661
0x9f6609 module_state::read_cluster(unsigned int)
 	../../../../src/gcc/gcc/cp/module.cc:14339
0x9f6e25 module_state::load_section(unsigned int, mc_slot*)
 	../../../../src/gcc/gcc/cp/module.cc:17387
0x9f6eef module_state::lazy_load(unsigned int, mc_slot*)
 	../../../../src/gcc/gcc/cp/module.cc:18001
We are damaged, This is broken.
Logic is lost,
We struggle,
Hunt through the rubble for what once was.
THIS IS AN IN-DEVELOPMENT COMPILER, it barfed, quelle horreur
See <https://gcc.gnu.org/wiki/cxx-modules#Bugs>, WHICH IS NOT THE USUAL REPORTING MECHANISM!
--

Here are the 'built' compiler details.

$ g++ -v

Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/home/strikr/root/gcc/libexec/gcc/x86_64-pc-linux-gnu/11.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../../../src/gcc/configure --prefix=/home/strikr/root/gcc --enable-languages=c,c++ --disable-multilib --disable-werror --with-gnu-ld --with-libcody=/home/strikr/root/libcody --enable-__cxa_atexit --enable-threads=posix --enable-tls --enable-bootstrap
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.0.0 20200805 (experimental) [## 6302da22e9fHEAD:20200810-1108] (GCC)

If anyone wishes to try out the gcc_cc_mod build, here is the link
https://sourceforge.net/projects/strikr/files/gcc/gcc_cc_mod-2020-08-10.tar.xz

Any pointers ? work around ?

Thanks for your time.


warm regards
Saifi.


More information about the Gcc-help mailing list