https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81994
Bug ID: 81994
Summary: [C++11]Internal error: same_comdat_group list across
different groups
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: felipematas at yahoo dot com
Target Milestone: ---
Created attachment 42050
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42050&action=edit
The reduced example from octave
Hi all, well i was compiling the actual dev octave and fails after talk in the
bugtracker i think the bug is here.
Well i try reduce the octave code to an example, so if someone can reduce it
more, or can know the nature of the bug please update the title, and the file
can have problems, i like force the octave code to get the error.
I test this with GCC versions 5.4, 5.4 (git version, without any patch) and
6.4, failing, but with 4.9.4 works.
The second condition to this happen is have gcc in debug mode, in my case
(Gentoo) i just need enable the debug USE, if i see right this is when we
compile using "--enable-checking=yes", I test a lot of combinations, but
finally this options was the only i found causing this.
I try test this with v7 but i would need rebuild my system and i want avoid
that, so if someone can test it would be great.
The compilation command: gcc -std=c++11 bug.cc
I try some variations with optimizer but the same result.
Log:
gcc -std=c++11 bug.cc
bug.cc:29:23: error: same_comdat_group list across different groups
template class B;
^
_ZN1BIbED0Ev/7 (B::~B() [with Z = bool]) @0x7fab7253a620
Type: function definition analyzed
Visibility: forced_by_abi public weak comdat_group:_ZN1BIbED0Ev one_only
virtual
Same comdat group as: _ZN1BIbED1Ev/6
Address is taken.
References:
Referring: _ZTV1BIbE/22 (addr)
First run: 0
Function flags: body
Called by:
Calls: _ZdlPv/30 (1.00 per call) _ZN1BIbED1Ev/6 (1.00 per call)
bug.cc:29:23: error interno del compilador: falló verify_cgraph_node
0x90e202 cgraph_node::verify_node()
/var/tmp/portage/sys-devel/gcc-5.4.0_pre/work/gcc-5.4.0-/gcc/cgraph.c:3201
0x9023f7 symtab_node::verify()
/var/tmp/portage/sys-devel/gcc-5.4.0_pre/work/gcc-5.4.0-/gcc/symtab.c:1103
0x903897 symtab_node::verify_symtab_nodes()
/var/tmp/portage/sys-devel/gcc-5.4.0_pre/work/gcc-5.4.0-/gcc/symtab.c:1123
0x915715 symbol_table::compile()
/var/tmp/portage/sys-devel/gcc-5.4.0_pre/work/gcc-5.4.0-/gcc/cgraphunit.c:2294
0x917d97 symbol_table::compile()
/var/tmp/portage/sys-devel/gcc-5.4.0_pre/work/gcc-5.4.0-/gcc/timevar.h:110
0x917d97 symbol_table::finalize_compilation_unit()
/var/tmp/portage/sys-devel/gcc-5.4.0_pre/work/gcc-5.4.0-/gcc/cgraphunit.c:2466
0x6e7487 cp_write_global_declarations()
/var/tmp/portage/sys-devel/gcc-5.4.0_pre/work/gcc-5.4.0-/gcc/cp/decl2.c:4849
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://bugs.gentoo.org/> for instructions.
With this configuration the code fails:
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/5.4.0-pre/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/5.4.0-pre/lto-wrapper
Objetivo: x86_64-pc-linux-gnu
Configurado con:
/var/tmp/portage/sys-devel/gcc-5.4.0_pre/work/gcc-5.4.0-/configure
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/5.4.0-pre
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0-pre/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/5.4.0-pre
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/5.4.0-pre/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/5.4.0-pre/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0-pre/include/g++-v5
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/5.4.0-pre/python
--enable-languages=c,c++,java,fortran --enable-obsolete --enable-secureplt
--disable-werror --with-system-zlib --enable-nls --without-included-gettext
--enable-checking=yes --with-bugurl=https://bugs.gentoo.org/
--with-pkgversion='Gentoo 5.4.0_pre' --enable-libstdcxx-time
--enable-shared --enable-threads=posix --enable-__cxa_atexit
--enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64
--disable-altivec --disable-fixed-point --enable-targets=all --enable-libgomp
--disable-libmudflap --disable-libssp --disable-libcilkrts --disable-libmpx
--disable-vtable-verify --disable-libvtv --enable-lto --without-isl
--disable-libsanitizer
Modelo de hilos: posix
gcc versión 5.4.0-pre 20170826 (Gentoo 5.4.0_pre)
With this configuration the code works:
/var/tmp/portage/sys-devel/gcc-5.4.0_pre/work/gcc-5