public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/65361] New: [5 Regression] LTO: tree check: expected tree that contains ‘decl minimal’ structure, have ‘tree_binfo’ in add_type_duplicate, at ipa-devirt.c:1509
@ 2015-03-09 12:46 burnus at gcc dot gnu.org
  2015-03-09 13:32 ` [Bug lto/65361] " rguenth at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: burnus at gcc dot gnu.org @ 2015-03-09 12:46 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 4195 bytes --]

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

            Bug ID: 65361
           Summary: [5 Regression] LTO: tree check: expected tree that
                    contains ‘decl minimal’ structure, have ‘tree_binfo’
                    in add_type_duplicate, at ipa-devirt.c:1509
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org
                CC: hubicka at gcc dot gnu.org

Created attachment 34989
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34989&action=edit
one.ii

Follow up to PR65276, PR65302 and PR65316, still for the same program - but I
have the feeling, we are slowly getting there. The real-program's message is
slightly different (get_odr_type, at ipa-devirt.c:1704).


g++ -c -std=c++11 -flto -O2 two.ii one.ii
gcc -r -nostdlib two.o one.o


one.ii:66:21: warning: type ‘struct ctype’ violates one definition rule [-Wodr]
   template <> class ctype < char >
                     ^
two.ii:51:21: note: a type with the same name but different number of
polymorphic bases is defined in another translation unit
   template <> class ctype < char >:public locale::facet, public ctype_base
                     ^
lto1: internal compiler error: tree check: expected tree that contains ‘decl
minimal’ structure, have ‘tree_binfo’ in add_type_duplicate, at
ipa-devirt.c:1509
0xca3d94 tree_contains_struct_check_failed(tree_node const*,
tree_node_structure_enum, char const*, int, char const*)
        ../../gcc/tree.c:9468
0x8948ec contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
        ../../gcc/tree.h:2960
0x8948ec add_type_duplicate
        ../../gcc/ipa-devirt.c:1508
0x8948ec get_odr_type(tree_node*, bool)
        ../../gcc/ipa-devirt.c:1763
0x89694f register_odr_type(tree_node*)
        ../../gcc/ipa-devirt.c:1839
>From gcc-bugs-return-479793-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Mar 09 12:47:17 2015
Return-Path: <gcc-bugs-return-479793-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 88639 invoked by alias); 9 Mar 2015 12:47:16 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 88588 invoked by uid 48); 9 Mar 2015 12:47:13 -0000
From: "burnus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug lto/65361] [5 Regression] LTO: tree check:=?UTF-8?Q? expected tree that contains ‘decl minimal’ structure?=,=?UTF-8?Q? have ‘tree_binfo’ in add_type_duplicate?=, at ipa-devirt.c:1509
Date: Mon, 09 Mar 2015 12:47:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: lto
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: burnus at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: attachments.created
Message-ID: <bug-65361-4-tqzVLMUBBH@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-65361-4@http.gcc.gnu.org/bugzilla/>
References: <bug-65361-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-03/txt/msg00937.txt.bz2
Content-length: 222

https://gcc.gnu.org/bugzilla/show_bug.cgi?ide361

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Created attachment 34990
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id4990&actioníit
two.ii


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

* [Bug lto/65361] [5 Regression] LTO: tree check: expected tree that contains ‘decl minimal’ structure, have ‘tree_binfo’ in add_type_duplicate, at ipa-devirt.c:1509
  2015-03-09 12:46 [Bug lto/65361] New: [5 Regression] LTO: tree check: expected tree that contains ‘decl minimal’ structure, have ‘tree_binfo’ in add_type_duplicate, at ipa-devirt.c:1509 burnus at gcc dot gnu.org
@ 2015-03-09 13:32 ` rguenth at gcc dot gnu.org
  2015-03-09 14:36 ` mpolacek at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-03-09 13:32 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |5.0


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

* [Bug lto/65361] [5 Regression] LTO: tree check: expected tree that contains ‘decl minimal’ structure, have ‘tree_binfo’ in add_type_duplicate, at ipa-devirt.c:1509
  2015-03-09 12:46 [Bug lto/65361] New: [5 Regression] LTO: tree check: expected tree that contains ‘decl minimal’ structure, have ‘tree_binfo’ in add_type_duplicate, at ipa-devirt.c:1509 burnus at gcc dot gnu.org
  2015-03-09 13:32 ` [Bug lto/65361] " rguenth at gcc dot gnu.org
@ 2015-03-09 14:36 ` mpolacek at gcc dot gnu.org
  2015-03-09 15:33 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-03-09 14:36 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-03-09
                 CC|                            |mpolacek at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Confirmed.


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

* [Bug lto/65361] [5 Regression] LTO: tree check: expected tree that contains ‘decl minimal’ structure, have ‘tree_binfo’ in add_type_duplicate, at ipa-devirt.c:1509
  2015-03-09 12:46 [Bug lto/65361] New: [5 Regression] LTO: tree check: expected tree that contains ‘decl minimal’ structure, have ‘tree_binfo’ in add_type_duplicate, at ipa-devirt.c:1509 burnus at gcc dot gnu.org
  2015-03-09 13:32 ` [Bug lto/65361] " rguenth at gcc dot gnu.org
  2015-03-09 14:36 ` mpolacek at gcc dot gnu.org
@ 2015-03-09 15:33 ` jakub at gcc dot gnu.org
  2015-03-09 16:01 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-03-09 15:33 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

Untested fix.  Now to create a smaller testcase.


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

* [Bug lto/65361] [5 Regression] LTO: tree check: expected tree that contains ‘decl minimal’ structure, have ‘tree_binfo’ in add_type_duplicate, at ipa-devirt.c:1509
  2015-03-09 12:46 [Bug lto/65361] New: [5 Regression] LTO: tree check: expected tree that contains ‘decl minimal’ structure, have ‘tree_binfo’ in add_type_duplicate, at ipa-devirt.c:1509 burnus at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2015-03-09 15:33 ` jakub at gcc dot gnu.org
@ 2015-03-09 16:01 ` jakub at gcc dot gnu.org
  2015-03-09 16:27 ` burnus at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-03-09 16:01 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
--- gcc/testsuite/g++.dg/lto/pr65361_0.C.jj    2015-03-09 16:43:42.720534781
+0100
+++ gcc/testsuite/g++.dg/lto/pr65361_0.C    2015-03-09 16:47:00.325356410 +0100
@@ -0,0 +1,6 @@
+// { dg-lto-do link { xfail } }
+// { dg-lto-options { { -flto -O2 } } }
+// { dg-extra-ld-options "-r -nostdlib -O2" }
+
+struct A { A () {} virtual ~A () {} };
+A a;
--- gcc/testsuite/g++.dg/lto/pr65361_1.C.jj    2015-03-09 16:43:45.981482330
+0100
+++ gcc/testsuite/g++.dg/lto/pr65361_1.C    2015-03-09 16:39:00.000000000 +0100
@@ -0,0 +1,3 @@
+struct B {};
+struct A : public B { A () {} virtual ~A () {} };
+A b;

reproduces this, but unfortunately lto.exp doesn't support link failures, nor
error messages out of lto1 during the linking.  So I'm afraid we need to live
without a testcase for now.
BTW, I see several spots with __attribute__((visibility ("default"))) on std
namespace in g++.dg/lto/, bet that is undesirable if some target would support
LTO, but not visibilities.


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

* [Bug lto/65361] [5 Regression] LTO: tree check: expected tree that contains ‘decl minimal’ structure, have ‘tree_binfo’ in add_type_duplicate, at ipa-devirt.c:1509
  2015-03-09 12:46 [Bug lto/65361] New: [5 Regression] LTO: tree check: expected tree that contains ‘decl minimal’ structure, have ‘tree_binfo’ in add_type_duplicate, at ipa-devirt.c:1509 burnus at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2015-03-09 16:01 ` jakub at gcc dot gnu.org
@ 2015-03-09 16:27 ` burnus at gcc dot gnu.org
  2015-03-09 20:20 ` jakub at gcc dot gnu.org
  2015-03-09 20:21 ` jakub at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu.org @ 2015-03-09 16:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #3)
> Untested fix

Thanks! It looks good for the the original two unreduced files. Also, I have
finally been able again to compile the full code (at least with some option
variants). For another variant, I still get an ICE (in
add_symbol_to_partition_1, at lto/lto-partition.c:158) after 64min of
compiling, which I will try to reduce now.


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

* [Bug lto/65361] [5 Regression] LTO: tree check: expected tree that contains ‘decl minimal’ structure, have ‘tree_binfo’ in add_type_duplicate, at ipa-devirt.c:1509
  2015-03-09 12:46 [Bug lto/65361] New: [5 Regression] LTO: tree check: expected tree that contains ‘decl minimal’ structure, have ‘tree_binfo’ in add_type_duplicate, at ipa-devirt.c:1509 burnus at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2015-03-09 16:27 ` burnus at gcc dot gnu.org
@ 2015-03-09 20:20 ` jakub at gcc dot gnu.org
  2015-03-09 20:21 ` jakub at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-03-09 20:20 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Mon Mar  9 20:19:34 2015
New Revision: 221286

URL: https://gcc.gnu.org/viewcvs?rev=221286&root=gcc&view=rev
Log:
    PR lto/65361
    * ipa-devirt.c (add_type_duplicate): Don't use DECL_CONTEXT
    on a TREE_BINFO, instead use BINFO_TYPE.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/ipa-devirt.c


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

* [Bug lto/65361] [5 Regression] LTO: tree check: expected tree that contains ‘decl minimal’ structure, have ‘tree_binfo’ in add_type_duplicate, at ipa-devirt.c:1509
  2015-03-09 12:46 [Bug lto/65361] New: [5 Regression] LTO: tree check: expected tree that contains ‘decl minimal’ structure, have ‘tree_binfo’ in add_type_duplicate, at ipa-devirt.c:1509 burnus at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2015-03-09 20:20 ` jakub at gcc dot gnu.org
@ 2015-03-09 20:21 ` jakub at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-03-09 20:21 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.


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

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

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-09 12:46 [Bug lto/65361] New: [5 Regression] LTO: tree check: expected tree that contains ‘decl minimal’ structure, have ‘tree_binfo’ in add_type_duplicate, at ipa-devirt.c:1509 burnus at gcc dot gnu.org
2015-03-09 13:32 ` [Bug lto/65361] " rguenth at gcc dot gnu.org
2015-03-09 14:36 ` mpolacek at gcc dot gnu.org
2015-03-09 15:33 ` jakub at gcc dot gnu.org
2015-03-09 16:01 ` jakub at gcc dot gnu.org
2015-03-09 16:27 ` burnus at gcc dot gnu.org
2015-03-09 20:20 ` jakub at gcc dot gnu.org
2015-03-09 20:21 ` jakub 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).