https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120112
--- Comment #1 from Joó Péter <joo.peter at gmail dot com> ---
I found an other warning combination which provides the same internal_error
call stack.
It needs these warnings, both of them, together:
-Wmismatched-tags -Wnamespaces
Also, I created a small bash script which reproduces the problem, from scratch:
rm -fR $HOME/gcc_bug_120112
mkdir $HOME/gcc_bug_120112
cd $HOME/gcc_bug_120112
git clone 'https://github.com/boostorg/boost.git' .
git checkout 'boost-1.88.0'
git submodule update --init --force --recursive --jobs=8192
g++ -I$HOME/gcc_bug_120112 -c
/home/p/gcc_bug_120112/libs/icl/test/ex_boost_party_/ex_boost_party.cpp -o
/dev/null -Wmismatched-tags -Wnamespaces
The internal_error call stack for the above single gcc command is this:
$HOME/gcc_bug_120112/libs/icl/test/ex_boost_party_/ex_boost_party.cpp: In
substitution of ‘template<class Type> struct boost::icl::map<DomainT,
CodomainT, Traits, Compare, Combine, Section, Alloc>::on_total_absorbable<Type,
true, true> [with Type = boost::icl::map<DomainT, CodomainT, Traits, Compare,
Combine, Section, Alloc>]’:
$HOME/gcc_bug_120112/libs/icl/test/ex_boost_party_/ex_boost_party.cpp:132:1:
required from here
132 | }
| ^
$HOME/gcc_bug_120112/libs/icl/test/ex_boost_party_/ex_boost_party.cpp:132:1:
internal compiler error: Segmentation fault
0x21a57ea internal_error(char const*, ...)
???:0
0x8d90cf tsubst(tree_node*, tree_node*, int, tree_node*)
???:0
0x8e2d3f tsubst_template_args(tree_node*, tree_node*, int, tree_node*)
???:0
0x8e3042 tsubst_template_args(tree_node*, tree_node*, int, tree_node*)
???:0
0x8ce6c0 most_specialized_partial_spec(tree_node*, int, bool)
???:0
0x889980 class_decl_loc_t::diag_mismatched_tags(tree_node*)
???:0
0x88ae44 class_decl_loc_t::diag_mismatched_tags()
???:0
0x9cd0f5 c_common_parse_file()
???:0
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See
<https://gitlab.archlinux.org/archlinux/packaging/packages/gcc/-/issues> for
instructions.
Tested with gcc versions: 14.2.1 and 15.1.0
Also, I attached the -freport-bug's output as 'freport-bug2.txt.gz'.