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

* [Bug c++/62164] 5.0: ICE: error: Both section and comdat group is set
  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 ` rguenth at gcc dot gnu.org
  2014-09-27  0:26 ` hubicka at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-08-18 13:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62164

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hubicka at gcc dot gnu.org

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Honza?


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

* [Bug c++/62164] 5.0: ICE: error: Both section and comdat group is set
  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
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: hubicka at gcc dot gnu.org @ 2014-09-27  0:26 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62164

Jan Hubicka <hubicka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-09-27
                 CC|                            |jason at redhat dot com
     Ever confirmed|0                           |1

--- Comment #2 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
The sections for COMDAT functions are used to drive code unification.  I
wonder, do we want to support something like this (and expect that user knows
what he is doing and he won't, for example, drop multiple COMDATs into one
section) or just reject the attribute?


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

* [Bug c++/62164] 5.0: ICE: error: Both section and comdat group is set
  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
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-03-25 11:43 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62164

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mpolacek at gcc dot gnu.org

--- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
This seems to be fixed now.


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

* [Bug c++/62164] 5.0: ICE: error: Both section and comdat group is set
  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
                   ` (2 preceding siblings ...)
  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
  5 siblings, 0 replies; 7+ messages in thread
From: paolo.carlini at oracle dot com @ 2015-08-13  9:36 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62164

--- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> ---
I'm adding the testcase and closing the bug.


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

* [Bug c++/62164] 5.0: ICE: error: Both section and comdat group is set
  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
                   ` (3 preceding siblings ...)
  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
  5 siblings, 0 replies; 7+ messages in thread
From: paolo at gcc dot gnu.org @ 2015-08-13 10:19 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62164

--- Comment #6 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> ---
Author: paolo
Date: Thu Aug 13 10:18:47 2015
New Revision: 226855

URL: https://gcc.gnu.org/viewcvs?rev=226855&root=gcc&view=rev
Log:
2015-08-13  Paolo Carlini  <paolo.carlini@oracle.com>

        PR c++/62164
        * g++.dg/torture/pr62164.C: New.

Added:
    trunk/gcc/testsuite/g++.dg/torture/pr62164.C
Modified:
    trunk/gcc/testsuite/ChangeLog


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

* [Bug c++/62164] 5.0: ICE: error: Both section and comdat group is set
  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
                   ` (4 preceding siblings ...)
  2015-08-13 10:19 ` paolo at gcc dot gnu.org
@ 2015-08-13 10:20 ` paolo.carlini at oracle dot com
  5 siblings, 0 replies; 7+ messages in thread
From: paolo.carlini at oracle dot com @ 2015-08-13 10:20 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62164

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|adam at os dot inf.tu-dresden.de   |
         Resolution|---                         |FIXED
   Target Milestone|---                         |5.0

--- Comment #7 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Done.


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