https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80234
Bug ID: 80234
Summary: ICE in splice_child_die at dwarfout.c:5265
Product: gcc
Version: 7.0.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: tim at array dot ca
Target Milestone: ---
Created attachment 41062
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41062&action=edit
preprocessed source
In the fedora rawhide GCC 7.0.1-0.12 build (x86_64), I'm getting an ICE in the
following code when generating debug info:
class foo
{
public:
static constexpr const char name_str[] = "foo";
virtual ~foo();
};
constexpr const char foo::name_str[];
foo::~foo()
{
}
% /usr/bin/c++ -g -std=gnu++17 -Wall -Wextra -o /home/tim/tmp/foo.o -c
/home/tim/Projects/ugp/src/ugp/UGF/Core/src/component/foo.cc
/home/tim/Projects/ugp/src/ugp/UGF/Core/src/component/foo.cc:18:1: internal
compiler error: in splice_child_die, at dwarf2out.c:5265
The code snippet is about as minimal as I can get it and still reproduce the
error. If I make the destructor non-virtual or get rid of the definition of
foo::name_str, the error disappears.