public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/43898]  New: -flto -g: "tree check: expected class 'type', have 'declaration'"
@ 2010-04-26 17:45 max at duempel dot org
  2010-04-27  9:41 ` [Bug lto/43898] -flto -g: ICE in dwarf2out_finish, at dwarf2out.c:21433 rguenth at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: max at duempel dot org @ 2010-04-26 17:45 UTC (permalink / raw)
  To: gcc-bugs

With "-flto -g", the following source will bail out with an internal compiler
error:

 void bug() {
   struct Class {
     Class(int a) {}
     virtual void f() {}
   };
   Class a(0);
 }

Command line: g++-4.5 -g -flto bug.cxx

Error message:

 bug.cxx: In member function 'bug()::Class::f()':
 bug.cxx:4:23: internal compiler error: tree check: expected class 'type', have
'declaration' (function_decl) in gen_type_die_with_usage, at dwarf2out.c:18962
 Please submit a full bug report,
 with preprocessed source if appropriate.
 See <file:///usr/share/doc/gcc-4.5/README.Bugs> for instructions.

Compiler version: gcc version 4.5.1 20100419 (prerelease) (Debian 4.5.0-2)


-- 
           Summary: -flto -g: "tree check: expected class 'type', have
                    'declaration'"
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: max at duempel dot org
 GCC build triplet: x86_64-linux-gnu
  GCC host triplet: x86_64-linux-gnu
GCC target triplet: x86_64-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43898


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

* [Bug lto/43898] -flto -g: ICE in dwarf2out_finish, at dwarf2out.c:21433
  2010-04-26 17:45 [Bug lto/43898] New: -flto -g: "tree check: expected class 'type', have 'declaration'" max at duempel dot org
@ 2010-04-27  9:41 ` rguenth at gcc dot gnu dot org
  2010-04-27  9:43 ` rguenth at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-04-27  9:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rguenth at gcc dot gnu dot org  2010-04-27 09:41 -------
The ICE has been fixed on the trunk (PR42653).  With the fix we now run into

lto1: internal compiler error: in dwarf2out_finish, at dwarf2out.c:21433
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


#2  0x00000000005cbe94 in dwarf2out_finish (filename=0x15f9040 "t.o")
    at /space/rguenther/src/svn/trunk/gcc/dwarf2out.c:21431
21431                 gcc_assert (context
(gdb) l
21426                 if (DECL_P (node->created_for))
21427                   context = DECL_CONTEXT (node->created_for);
21428                 else if (TYPE_P (node->created_for))
21429                   context = TYPE_CONTEXT (node->created_for);
21430
21431                 gcc_assert (context
21432                             && (TREE_CODE (context) == FUNCTION_DECL
21433                                 || TREE_CODE (context) ==
NAMESPACE_DECL));
21434
21435                 origin = lookup_decl_die (context);
(gdb) p context
$1 = (tree) 0x7ffff5af0b28
(gdb) p context->base.code
$2 = RECORD_TYPE


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |lto
   Last reconfirmed|0000-00-00 00:00:00         |2010-04-27 09:41:34
               date|                            |
            Summary|-flto -g: "tree check:      |-flto -g: ICE in
                   |expected class 'type', have |dwarf2out_finish, at
                   |'declaration'"              |dwarf2out.c:21433
            Version|4.5.0                       |4.6.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43898


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

* [Bug lto/43898] -flto -g: ICE in dwarf2out_finish, at dwarf2out.c:21433
  2010-04-26 17:45 [Bug lto/43898] New: -flto -g: "tree check: expected class 'type', have 'declaration'" max at duempel dot org
  2010-04-27  9:41 ` [Bug lto/43898] -flto -g: ICE in dwarf2out_finish, at dwarf2out.c:21433 rguenth at gcc dot gnu dot org
@ 2010-04-27  9:43 ` rguenth at gcc dot gnu dot org
  2010-05-25 13:40 ` rguenth at gcc dot gnu dot org
  2010-07-23 18:52 ` rguenth at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-04-27  9:43 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2010-04-27 09:41:34         |2010-04-27 09:43:31
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43898


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

* [Bug lto/43898] -flto -g: ICE in dwarf2out_finish, at dwarf2out.c:21433
  2010-04-26 17:45 [Bug lto/43898] New: -flto -g: "tree check: expected class 'type', have 'declaration'" max at duempel dot org
  2010-04-27  9:41 ` [Bug lto/43898] -flto -g: ICE in dwarf2out_finish, at dwarf2out.c:21433 rguenth at gcc dot gnu dot org
  2010-04-27  9:43 ` rguenth at gcc dot gnu dot org
@ 2010-05-25 13:40 ` rguenth at gcc dot gnu dot org
  2010-07-23 18:52 ` rguenth at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-05-25 13:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2010-05-25 13:40 -------
Re-confirmed.  It's not some decl/type context that is missing, maybe some
C++ debug hook that needs to be emulated.

Not working on this at the moment.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|rguenth at gcc dot gnu dot  |unassigned at gcc dot gnu
                   |org                         |dot org
             Status|ASSIGNED                    |NEW


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43898


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

* [Bug lto/43898] -flto -g: ICE in dwarf2out_finish, at dwarf2out.c:21433
  2010-04-26 17:45 [Bug lto/43898] New: -flto -g: "tree check: expected class 'type', have 'declaration'" max at duempel dot org
                   ` (2 preceding siblings ...)
  2010-05-25 13:40 ` rguenth at gcc dot gnu dot org
@ 2010-07-23 18:52 ` rguenth at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-07-23 18:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2010-07-23 18:51 -------


*** This bug has been marked as a duplicate of 44950 ***


-- 

rguenth at gcc dot gnu dot org changed:

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


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43898


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

end of thread, other threads:[~2010-07-23 18:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-26 17:45 [Bug lto/43898] New: -flto -g: "tree check: expected class 'type', have 'declaration'" max at duempel dot org
2010-04-27  9:41 ` [Bug lto/43898] -flto -g: ICE in dwarf2out_finish, at dwarf2out.c:21433 rguenth at gcc dot gnu dot org
2010-04-27  9:43 ` rguenth at gcc dot gnu dot org
2010-05-25 13:40 ` rguenth at gcc dot gnu dot org
2010-07-23 18:52 ` rguenth at gcc dot gnu dot 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).