public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* compiling with '-g' option causes 'internal compiler error' (g++: devel/c++-modules branch)
@ 2020-08-11 17:35 SAIFI
  2020-08-11 18:39 ` Jonathan Wakely
  0 siblings, 1 reply; 3+ messages in thread
From: SAIFI @ 2020-08-11 17:35 UTC (permalink / raw)
  To: gcc-help

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: compiling with '-g' option causes 'internal compiler error' (g++: devel/c++-modules branch)
  2020-08-11 17:35 compiling with '-g' option causes 'internal compiler error' (g++: devel/c++-modules branch) SAIFI
@ 2020-08-11 18:39 ` Jonathan Wakely
  2020-08-12  3:00   ` SAIFI
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Wakely @ 2020-08-11 18:39 UTC (permalink / raw)
  To: SAIFI; +Cc: gcc-help

On Tue, 11 Aug 2020 at 18:38, SAIFI wrote:
>
> 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.

I sent this to the modules branch developer (who isn't on this list)
and he said "oops, it worked when I tried it.  I'll update the wiki".

But he has an idea why it might be going wrong and will look into it.
There's no workaround for now though.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: compiling with '-g' option causes 'internal compiler error' (g++: devel/c++-modules branch)
  2020-08-11 18:39 ` Jonathan Wakely
@ 2020-08-12  3:00   ` SAIFI
  0 siblings, 0 replies; 3+ messages in thread
From: SAIFI @ 2020-08-12  3:00 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: gcc-help, nathan

On Tue, 11 Aug 2020, Jonathan Wakely wrote:

> On Tue, 11 Aug 2020 at 18:38, SAIFI wrote:
>>
>> 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.
>
> I sent this to the modules branch developer (who isn't on this list)
> and he said "oops, it worked when I tried it.  I'll update the wiki".
>
> But he has an idea why it might be going wrong and will look into it.
> There's no workaround for now though.
>

Hi Jonathan:

Thanks for your reply.

Thanks to Nathan Sidwell for the awesome work on C++20 modules. His
CppCon2019 talk on migrating to C++20 modules (cf. tinyxml2) was very
impressive.


warm regards
Saifi.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-08-12  3:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-11 17:35 compiling with '-g' option causes 'internal compiler error' (g++: devel/c++-modules branch) SAIFI
2020-08-11 18:39 ` Jonathan Wakely
2020-08-12  3:00   ` SAIFI

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).