public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/62164] New: 5.0: ICE: error: Both section and comdat group is set
@ 2014-08-17  9:20 adam at os dot inf.tu-dresden.de
  2014-08-18 13:58 ` [Bug c++/62164] " rguenth at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: adam at os dot inf.tu-dresden.de @ 2014-08-17  9:20 UTC (permalink / raw)
  To: gcc-bugs

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.


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

end of thread, other threads:[~2015-08-13 10:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-17  9:20 [Bug c++/62164] New: 5.0: ICE: error: Both section and comdat group is set adam at os dot inf.tu-dresden.de
2014-08-18 13:58 ` [Bug c++/62164] " rguenth at gcc dot gnu.org
2014-09-27  0:26 ` hubicka at gcc dot gnu.org
2015-03-25 11:43 ` mpolacek at gcc dot gnu.org
2015-08-13  9:36 ` paolo.carlini at oracle dot com
2015-08-13 10:19 ` paolo at gcc dot gnu.org
2015-08-13 10:20 ` paolo.carlini at oracle dot com

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).