public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ipa/64988] New: [5 Regression] ICE: verify_cgraph_node failed: Alias and target's comdat groups differs with -fdeclone-ctor-dtor
@ 2015-02-09 19:49 zsojka at seznam dot cz
  2015-02-10 10:20 ` [Bug ipa/64988] " rguenth at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: zsojka at seznam dot cz @ 2015-02-09 19:49 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 64988
           Summary: [5 Regression] ICE: verify_cgraph_node failed: Alias
                    and target's comdat groups differs with
                    -fdeclone-ctor-dtor
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ipa
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz

Created attachment 34708
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34708&action=edit
reduced testcase

Compiler output:
$ gcc -O -fdeclone-ctor-dtor testcase.C 
testcase.C:10:4: error: Alias and target's comdat groups differs
 D d;
    ^
_ZN1DD0Ev/36 (virtual D::~D()) @0x7fc5f0160000
  Type: function definition analyzed
  Visibility: externally_visible public weak comdat comdat_group:_ZN1DD5Ev
one_only section:.text._ZN1DD0Ev (implicit_section) virtual artificial
  Address is taken.
  References: 
  Referring: *.LTHUNK7/43 (alias)_ZTV1D/29 (addr)
  Availability: available
  First run: 0
  Function flags: body
  Called by: 
  Calls: _ZdlPv/59 (1.00 per call) _ZN1DD1Ev/79 (inlined) (1.00 per call) (can
throw external) 
*.LTHUNK7/43 (virtual void *.LTHUNK7()) @0x7fc5f0160ab8
  Type: function definition analyzed alias cpp_implicit_alias
  Visibility: prevailing_def_ironly section:.text._ZN1DD0Ev (implicit_section)
virtual artificial
  References: _ZN1DD0Ev/36 (alias)
  Referring: 
  Availability: available
  First run: 0
  Function flags:
  Called by: _ZThn8_N1DD0Ev/44 (1.00 per call) 
  Calls: 
testcase.C:10:4: internal compiler error: verify_cgraph_node failed
0x9e3afd cgraph_node::verify_node()
        /mnt/svn/gcc-trunk/gcc/cgraph.c:3100
0x9d8997 symtab_node::verify()
        /mnt/svn/gcc-trunk/gcc/symtab.c:1161
0x9d9c27 symtab_node::verify_symtab_nodes()
        /mnt/svn/gcc-trunk/gcc/symtab.c:1181
0xc1cd48 symbol_table::remove_unreachable_nodes(_IO_FILE*)
        /mnt/svn/gcc-trunk/gcc/ipa.c:674
0x183c7be ipa_inline
        /mnt/svn/gcc-trunk/gcc/ipa-inline.c:2307
0x183c7be execute
        /mnt/svn/gcc-trunk/gcc/ipa-inline.c:2693
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.

Tested revisions:
r220527 - ICE
4_9 r219040 - OK


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

* [Bug ipa/64988] [5 Regression] ICE: verify_cgraph_node failed: Alias and target's comdat groups differs with -fdeclone-ctor-dtor
  2015-02-09 19:49 [Bug ipa/64988] New: [5 Regression] ICE: verify_cgraph_node failed: Alias and target's comdat groups differs with -fdeclone-ctor-dtor zsojka at seznam dot cz
@ 2015-02-10 10:20 ` rguenth at gcc dot gnu.org
  2015-02-10 11:58 ` jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-02-10 10:20 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-checking
           Priority|P3                          |P1
                 CC|                            |hubicka at gcc dot gnu.org
   Target Milestone|---                         |5.0


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

* [Bug ipa/64988] [5 Regression] ICE: verify_cgraph_node failed: Alias and target's comdat groups differs with -fdeclone-ctor-dtor
  2015-02-09 19:49 [Bug ipa/64988] New: [5 Regression] ICE: verify_cgraph_node failed: Alias and target's comdat groups differs with -fdeclone-ctor-dtor zsojka at seznam dot cz
  2015-02-10 10:20 ` [Bug ipa/64988] " rguenth at gcc dot gnu.org
@ 2015-02-10 11:58 ` jakub at gcc dot gnu.org
  2015-02-23 19:55 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-02-10 11:58 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-02-10
                 CC|                            |jakub at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r219696.


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

* [Bug ipa/64988] [5 Regression] ICE: verify_cgraph_node failed: Alias and target's comdat groups differs with -fdeclone-ctor-dtor
  2015-02-09 19:49 [Bug ipa/64988] New: [5 Regression] ICE: verify_cgraph_node failed: Alias and target's comdat groups differs with -fdeclone-ctor-dtor zsojka at seznam dot cz
  2015-02-10 10:20 ` [Bug ipa/64988] " rguenth at gcc dot gnu.org
  2015-02-10 11:58 ` jakub at gcc dot gnu.org
@ 2015-02-23 19:55 ` jakub at gcc dot gnu.org
  2015-03-02  0:11 ` hubicka at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-02-23 19:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 34847
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34847&action=edit
gcc5-pr64988.patch

Patch I've been thinking about, fixes the testcase, but doesn't survive
bootstrap - apparently it is unsafe to call get_alias_target in some cases.
Honza?


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

* [Bug ipa/64988] [5 Regression] ICE: verify_cgraph_node failed: Alias and target's comdat groups differs with -fdeclone-ctor-dtor
  2015-02-09 19:49 [Bug ipa/64988] New: [5 Regression] ICE: verify_cgraph_node failed: Alias and target's comdat groups differs with -fdeclone-ctor-dtor zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2015-02-23 19:55 ` jakub at gcc dot gnu.org
@ 2015-03-02  0:11 ` hubicka at gcc dot gnu.org
  2015-03-02  1:17 ` hubicka at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: hubicka at gcc dot gnu.org @ 2015-03-02  0:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
The problem here is that inliner dissolves comdat group it should not.
We inline comdat local function and the fact we can remove it from program does
not mean we can dissolve the group.

I am testing:
Index: ipa-inline-transform.c
===================================================================
--- ipa-inline-transform.c      (revision 221092)
+++ ipa-inline-transform.c      (working copy)
@@ -213,7 +213,7 @@ clone_inlined_nodes (struct cgraph_edge
             For now we keep the ohter functions in the group in program until
             cgraph_remove_unreachable_functions gets rid of them.  */
          gcc_assert (!e->callee->global.inlined_to);
-         e->callee->dissolve_same_comdat_group_list ();
+         e->callee->remove_from_same_comdat_group ();
          if (e->callee->definition
              && inline_account_function_p (e->callee))
            {


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

* [Bug ipa/64988] [5 Regression] ICE: verify_cgraph_node failed: Alias and target's comdat groups differs with -fdeclone-ctor-dtor
  2015-02-09 19:49 [Bug ipa/64988] New: [5 Regression] ICE: verify_cgraph_node failed: Alias and target's comdat groups differs with -fdeclone-ctor-dtor zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2015-03-02  0:11 ` hubicka at gcc dot gnu.org
@ 2015-03-02  1:17 ` hubicka at gcc dot gnu.org
  2015-03-02  1:21 ` hubicka at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: hubicka at gcc dot gnu.org @ 2015-03-02  1:17 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
And concerning Jakub's question, get_alias_target will ICE when the target does
not exist :) This can be the case during function removal that use
dissolve_comdat_group. But it is also the case of weakref that does not have
external declaration and during callgraph construction.


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

* [Bug ipa/64988] [5 Regression] ICE: verify_cgraph_node failed: Alias and target's comdat groups differs with -fdeclone-ctor-dtor
  2015-02-09 19:49 [Bug ipa/64988] New: [5 Regression] ICE: verify_cgraph_node failed: Alias and target's comdat groups differs with -fdeclone-ctor-dtor zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  2015-03-02  1:17 ` hubicka at gcc dot gnu.org
@ 2015-03-02  1:21 ` hubicka at gcc dot gnu.org
  2015-03-02 20:11 ` hubicka at gcc dot gnu.org
  2015-03-02 20:12 ` hubicka at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: hubicka at gcc dot gnu.org @ 2015-03-02  1:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
And concerning Jakub's question, get_alias_target will ICE when the target does
not exist :).

This is the case in corner situation (call graph construction and function
removal - where you hit it). Also weakref does not need to have a target. This
is signalized by definition flag.


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

* [Bug ipa/64988] [5 Regression] ICE: verify_cgraph_node failed: Alias and target's comdat groups differs with -fdeclone-ctor-dtor
  2015-02-09 19:49 [Bug ipa/64988] New: [5 Regression] ICE: verify_cgraph_node failed: Alias and target's comdat groups differs with -fdeclone-ctor-dtor zsojka at seznam dot cz
                   ` (5 preceding siblings ...)
  2015-03-02  1:21 ` hubicka at gcc dot gnu.org
@ 2015-03-02 20:11 ` hubicka at gcc dot gnu.org
  2015-03-02 20:12 ` hubicka at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: hubicka at gcc dot gnu.org @ 2015-03-02 20:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Author: hubicka
Date: Mon Mar  2 20:10:56 2015
New Revision: 221123

URL: https://gcc.gnu.org/viewcvs?rev=221123&root=gcc&view=rev
Log:

    PR ipa/64988
    * ipa-inline-transform.c (clone_inlined_nodes): Do not dissolve
    comdat groups.
    * g++.dg/torture/pr64988.C: New testcase.

Added:
    trunk/gcc/testsuite/g++.dg/torture/pr64988.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/ipa-inline-transform.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug ipa/64988] [5 Regression] ICE: verify_cgraph_node failed: Alias and target's comdat groups differs with -fdeclone-ctor-dtor
  2015-02-09 19:49 [Bug ipa/64988] New: [5 Regression] ICE: verify_cgraph_node failed: Alias and target's comdat groups differs with -fdeclone-ctor-dtor zsojka at seznam dot cz
                   ` (6 preceding siblings ...)
  2015-03-02 20:11 ` hubicka at gcc dot gnu.org
@ 2015-03-02 20:12 ` hubicka at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: hubicka at gcc dot gnu.org @ 2015-03-02 20:12 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #7 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Fixed.


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

end of thread, other threads:[~2015-03-02 20:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-09 19:49 [Bug ipa/64988] New: [5 Regression] ICE: verify_cgraph_node failed: Alias and target's comdat groups differs with -fdeclone-ctor-dtor zsojka at seznam dot cz
2015-02-10 10:20 ` [Bug ipa/64988] " rguenth at gcc dot gnu.org
2015-02-10 11:58 ` jakub at gcc dot gnu.org
2015-02-23 19:55 ` jakub at gcc dot gnu.org
2015-03-02  0:11 ` hubicka at gcc dot gnu.org
2015-03-02  1:17 ` hubicka at gcc dot gnu.org
2015-03-02  1:21 ` hubicka at gcc dot gnu.org
2015-03-02 20:11 ` hubicka at gcc dot gnu.org
2015-03-02 20:12 ` hubicka at gcc dot gnu.org

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