This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/62164] New: 5.0: ICE: error: Both section and comdat group is set
- From: "adam at os dot inf.tu-dresden.de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 17 Aug 2014 09:20:07 +0000
- Subject: [Bug c++/62164] New: 5.0: ICE: error: Both section and comdat group is set
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62164
Bug ID: 62164
Summary: 5.0: ICE: error: Both section and comdat group is set
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: adam at os dot inf.tu-dresden.de
The following code causes an ICE:
class T { static void t(); };
class U
{
public:
static void u() __attribute__ ((__section__ (".initcall.text")));
};
inline void U::u() {}
void T::t() { U::u(); }
$ g++ --version
g++ (GCC) 5.0.0 20140817 (experimental)
$ g++ -c t.c
t.c:11:23: error: Both section and comdat group is set
void T::t() { U::u(); }
^
_ZN1U1uEv/0 (static void U::u()) @0x7f3c83ebe000
Type: function definition analyzed
Visibility: public weak comdat comdat_group:_ZN1U1uEv one_only
section:.initcall.text
References:
Referring:
First run: 0
Function flags: body
Called by: _ZN1T1tEv/2 (1.00 per call)
Calls:
t.c:11:23: internal compiler error: verify_cgraph_node failed
0x858967 cgraph_node::verify_node()
../../gcc/gcc/cgraph.c:2978
0x84f757 symtab_node::verify()
../../gcc/gcc/symtab.c:1200
0x850eb7 symtab_node::verify_symtab_nodes()
../../gcc/gcc/symtab.c:1220
0x85e73a compile()
../../gcc/gcc/cgraphunit.c:2157
0x860874 finalize_compilation_unit()
../../gcc/gcc/cgraphunit.c:2331
0x6500b5 cp_write_global_declarations()
../../gcc/gcc/cp/decl2.c:4649
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
The problem seems to be that U::u() is tagged inline. If it is not inline,
there is no ICE.
No ICE for <= 4.9.