public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/48207] New: ICE in lhd_set_decl_assembler_name, at langhooks.c:158
@ 2011-03-19 21:57 d.g.gorbachev at gmail dot com
  2011-03-19 21:57 ` [Bug lto/48207] " d.g.gorbachev at gmail dot com
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: d.g.gorbachev at gmail dot com @ 2011-03-19 21:57 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: ICE in lhd_set_decl_assembler_name, at langhooks.c:158
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: d.g.gorbachev@gmail.com
                CC: rguenth@gcc.gnu.org


Created attachment 23727
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23727
Testcase (compile with `g++ -flto -g pr48207.cc')


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

* [Bug lto/48207] ICE in lhd_set_decl_assembler_name, at langhooks.c:158
  2011-03-19 21:57 [Bug lto/48207] New: ICE in lhd_set_decl_assembler_name, at langhooks.c:158 d.g.gorbachev at gmail dot com
@ 2011-03-19 21:57 ` d.g.gorbachev at gmail dot com
  2011-03-21 13:43 ` [Bug debug/48207] " rguenth at gcc dot gnu.org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: d.g.gorbachev at gmail dot com @ 2011-03-19 21:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Dmitry Gorbachev <d.g.gorbachev at gmail dot com> 2011-03-19 20:05:44 UTC ---
Created attachment 23728
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23728
Backtrace


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

* [Bug debug/48207] ICE in lhd_set_decl_assembler_name, at langhooks.c:158
  2011-03-19 21:57 [Bug lto/48207] New: ICE in lhd_set_decl_assembler_name, at langhooks.c:158 d.g.gorbachev at gmail dot com
  2011-03-19 21:57 ` [Bug lto/48207] " d.g.gorbachev at gmail dot com
@ 2011-03-21 13:43 ` rguenth at gcc dot gnu.org
  2011-03-30  9:14 ` rguenth at gcc dot gnu.org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-03-21 13:43 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
           Keywords|                            |lto
   Last reconfirmed|                            |2011.03.21 13:12:20
          Component|lto                         |debug
             Blocks|                            |47819
         AssignedTo|unassigned at gcc dot       |rguenth at gcc dot gnu.org
                   |gnu.org                     |
     Ever Confirmed|0                           |1

--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-03-21 13:12:20 UTC ---
Confirmed, mine.

We are processing BLOCKs of the function which has the TYPE_DECL.

#10 0x000000000093b5a4 in decls_for_scope (stmt=0x7ffff5b7edc0, 
    context_die=0x7ffff7ef8140, depth=1)
    at /space/rguenther/src/svn/trunk/gcc/dwarf2out.c:20886
20886       process_scope_var (stmt, decl, NULL_TREE, context_die);
(gdb) p decl->base.code
$5 = TYPE_DECL

and we probably expect that a DIE was already created for it by
the FE:

  else if (TREE_CODE (decl_or_origin) == TYPE_DECL
           && TYPE_DECL_IS_STUB (decl_or_origin))
    die = lookup_type_die (TREE_TYPE (decl_or_origin));

...

  if (die != NULL && die->die_parent == NULL)
    add_child_die (context_die, die);

but we fall through to gen_decl_die.  Then we run into

              /* This is a GNU Extension.  We are adding a
                 DW_AT_linkage_name attribute to the DIE of the
                 anonymous struct TYPE.  The value of that attribute
                 is the name of the typedef decl naming the anonymous
                 struct.  This greatly eases the work of consumers of
                 this debug info.  */
              add_linkage_attr (lookup_type_die (type), decl);

which we barf on as we didn't create assembler-names for TYPE_DECLs
and we can't at this point (the FE isn't anymore).

Btw, LTO should override decl_assembler_name with a gcc_unreachable ().


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

* [Bug debug/48207] ICE in lhd_set_decl_assembler_name, at langhooks.c:158
  2011-03-19 21:57 [Bug lto/48207] New: ICE in lhd_set_decl_assembler_name, at langhooks.c:158 d.g.gorbachev at gmail dot com
  2011-03-19 21:57 ` [Bug lto/48207] " d.g.gorbachev at gmail dot com
  2011-03-21 13:43 ` [Bug debug/48207] " rguenth at gcc dot gnu.org
@ 2011-03-30  9:14 ` rguenth at gcc dot gnu.org
  2011-03-31  3:32 ` bastiaan at bjacques dot org
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-03-30  9:14 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |matt at use dot net

--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-03-30 09:02:23 UTC ---
*** Bug 48346 has been marked as a duplicate of this bug. ***


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

* [Bug debug/48207] ICE in lhd_set_decl_assembler_name, at langhooks.c:158
  2011-03-19 21:57 [Bug lto/48207] New: ICE in lhd_set_decl_assembler_name, at langhooks.c:158 d.g.gorbachev at gmail dot com
                   ` (2 preceding siblings ...)
  2011-03-30  9:14 ` rguenth at gcc dot gnu.org
@ 2011-03-31  3:32 ` bastiaan at bjacques dot org
  2011-04-07 21:56 ` hubicka at gcc dot gnu.org
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: bastiaan at bjacques dot org @ 2011-03-31  3:32 UTC (permalink / raw)
  To: gcc-bugs

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

Bastiaan Jacques <bastiaan at bjacques dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bastiaan at bjacques dot
                   |                            |org

--- Comment #4 from Bastiaan Jacques <bastiaan at bjacques dot org> 2011-03-31 01:35:01 UTC ---
Alternative testcase (g++ -flto -g):

namespace {
  typedef struct {
    int x;
  } Foo;
}


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

* [Bug debug/48207] ICE in lhd_set_decl_assembler_name, at langhooks.c:158
  2011-03-19 21:57 [Bug lto/48207] New: ICE in lhd_set_decl_assembler_name, at langhooks.c:158 d.g.gorbachev at gmail dot com
                   ` (3 preceding siblings ...)
  2011-03-31  3:32 ` bastiaan at bjacques dot org
@ 2011-04-07 21:56 ` hubicka at gcc dot gnu.org
  2011-04-19 13:06 ` rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: hubicka at gcc dot gnu.org @ 2011-04-07 21:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jan Hubicka <hubicka at gcc dot gnu.org> 2011-04-07 21:56:25 UTC ---
*** Bug 48505 has been marked as a duplicate of this bug. ***


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

* [Bug debug/48207] ICE in lhd_set_decl_assembler_name, at langhooks.c:158
  2011-03-19 21:57 [Bug lto/48207] New: ICE in lhd_set_decl_assembler_name, at langhooks.c:158 d.g.gorbachev at gmail dot com
                   ` (4 preceding siblings ...)
  2011-04-07 21:56 ` hubicka at gcc dot gnu.org
@ 2011-04-19 13:06 ` rguenth at gcc dot gnu.org
  2011-04-19 13:08 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-04-19 13:06 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-04-19 13:05:01 UTC ---
Author: rguenth
Date: Tue Apr 19 13:04:57 2011
New Revision: 172708

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=172708
Log:
2011-04-19  Richard Guenther  <rguenther@suse.de>

    PR lto/48207
    * tree.c (free_lang_data): Do not reset the decl-assembler-name
    langhook.

    * g++.dg/lto/pr48207_0.C: New testcase.

Added:
    trunk/gcc/testsuite/g++.dg/lto/pr48207_0.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree.c


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

* [Bug debug/48207] ICE in lhd_set_decl_assembler_name, at langhooks.c:158
  2011-03-19 21:57 [Bug lto/48207] New: ICE in lhd_set_decl_assembler_name, at langhooks.c:158 d.g.gorbachev at gmail dot com
                   ` (5 preceding siblings ...)
  2011-04-19 13:06 ` rguenth at gcc dot gnu.org
@ 2011-04-19 13:08 ` rguenth at gcc dot gnu.org
  2011-05-18 11:24 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-04-19 13:08 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |4.7.0

--- Comment #7 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-04-19 13:05:16 UTC ---
Fixed for trunk sofar.


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

* [Bug debug/48207] ICE in lhd_set_decl_assembler_name, at langhooks.c:158
  2011-03-19 21:57 [Bug lto/48207] New: ICE in lhd_set_decl_assembler_name, at langhooks.c:158 d.g.gorbachev at gmail dot com
                   ` (6 preceding siblings ...)
  2011-04-19 13:08 ` rguenth at gcc dot gnu.org
@ 2011-05-18 11:24 ` rguenth at gcc dot gnu.org
  2011-05-18 13:54 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-05-18 11:24 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vincenzo.innocente at cern
                   |                            |dot ch

--- Comment #8 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-05-18 11:08:35 UTC ---
*** Bug 49041 has been marked as a duplicate of this bug. ***


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

* [Bug debug/48207] ICE in lhd_set_decl_assembler_name, at langhooks.c:158
  2011-03-19 21:57 [Bug lto/48207] New: ICE in lhd_set_decl_assembler_name, at langhooks.c:158 d.g.gorbachev at gmail dot com
                   ` (7 preceding siblings ...)
  2011-05-18 11:24 ` rguenth at gcc dot gnu.org
@ 2011-05-18 13:54 ` rguenth at gcc dot gnu.org
  2011-05-18 14:07 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-05-18 13:54 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
      Known to work|                            |4.6.1
         Resolution|                            |FIXED
   Target Milestone|---                         |4.6.1

--- Comment #10 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-05-18 13:30:00 UTC ---
Fixed for 4.6.1.


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

* [Bug debug/48207] ICE in lhd_set_decl_assembler_name, at langhooks.c:158
  2011-03-19 21:57 [Bug lto/48207] New: ICE in lhd_set_decl_assembler_name, at langhooks.c:158 d.g.gorbachev at gmail dot com
                   ` (8 preceding siblings ...)
  2011-05-18 13:54 ` rguenth at gcc dot gnu.org
@ 2011-05-18 14:07 ` rguenth at gcc dot gnu.org
  2011-05-19 10:47 ` jakub at gcc dot gnu.org
  2011-06-15 14:50 ` rguenth at gcc dot gnu.org
  11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-05-18 14:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-05-18 13:29:27 UTC ---
Author: rguenth
Date: Wed May 18 13:29:24 2011
New Revision: 173860

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173860
Log:
2011-05-18  Richard Guenther  <rguenther@suse.de>

        Backport from mainline
        2011-04-19  Richard Guenther  <rguenther@suse.de>

    PR lto/48207
    * tree.c (free_lang_data): Do not reset the decl-assembler-name
    langhook.

    * g++.dg/lto/pr48207_0.C: New testcase.

        2011-04-21  Richard Guenther  <rguenther@suse.de>

    PR lto/48703
    * tree.c (free_lang_data_in_decl): Do not zero TREE_TYPE of
    DECL_NAME.

    * g++.dg/lto/pr48207-2_0.C: New testcase.
    * g++.dg/lto/pr48207-3_0.C: Likewise.

Added:
    branches/gcc-4_6-branch/gcc/testsuite/g++.dg/lto/pr48207-2_0.C
    branches/gcc-4_6-branch/gcc/testsuite/g++.dg/lto/pr48207-3_0.C
    branches/gcc-4_6-branch/gcc/testsuite/g++.dg/lto/pr48207_0.C
Modified:
    branches/gcc-4_6-branch/gcc/ChangeLog
    branches/gcc-4_6-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_6-branch/gcc/tree.c


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

* [Bug debug/48207] ICE in lhd_set_decl_assembler_name, at langhooks.c:158
  2011-03-19 21:57 [Bug lto/48207] New: ICE in lhd_set_decl_assembler_name, at langhooks.c:158 d.g.gorbachev at gmail dot com
                   ` (9 preceding siblings ...)
  2011-05-18 14:07 ` rguenth at gcc dot gnu.org
@ 2011-05-19 10:47 ` jakub at gcc dot gnu.org
  2011-06-15 14:50 ` rguenth at gcc dot gnu.org
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-05-19 10:47 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |flast at flast dot jp

--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-05-19 09:51:42 UTC ---
*** Bug 49056 has been marked as a duplicate of this bug. ***


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

* [Bug debug/48207] ICE in lhd_set_decl_assembler_name, at langhooks.c:158
  2011-03-19 21:57 [Bug lto/48207] New: ICE in lhd_set_decl_assembler_name, at langhooks.c:158 d.g.gorbachev at gmail dot com
                   ` (10 preceding siblings ...)
  2011-05-19 10:47 ` jakub at gcc dot gnu.org
@ 2011-06-15 14:50 ` rguenth at gcc dot gnu.org
  11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-06-15 14:50 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason.vas.dias at gmail dot
                   |                            |com

--- Comment #12 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-06-15 14:48:04 UTC ---
*** Bug 49424 has been marked as a duplicate of this bug. ***


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

end of thread, other threads:[~2011-06-15 14:50 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-19 21:57 [Bug lto/48207] New: ICE in lhd_set_decl_assembler_name, at langhooks.c:158 d.g.gorbachev at gmail dot com
2011-03-19 21:57 ` [Bug lto/48207] " d.g.gorbachev at gmail dot com
2011-03-21 13:43 ` [Bug debug/48207] " rguenth at gcc dot gnu.org
2011-03-30  9:14 ` rguenth at gcc dot gnu.org
2011-03-31  3:32 ` bastiaan at bjacques dot org
2011-04-07 21:56 ` hubicka at gcc dot gnu.org
2011-04-19 13:06 ` rguenth at gcc dot gnu.org
2011-04-19 13:08 ` rguenth at gcc dot gnu.org
2011-05-18 11:24 ` rguenth at gcc dot gnu.org
2011-05-18 13:54 ` rguenth at gcc dot gnu.org
2011-05-18 14:07 ` rguenth at gcc dot gnu.org
2011-05-19 10:47 ` jakub at gcc dot gnu.org
2011-06-15 14:50 ` rguenth 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).