public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/52400] New: lto1: ICE with extern on static linkage
@ 2012-02-27 14:03 chrbr at gcc dot gnu.org
  2012-02-27 14:20 ` [Bug lto/52400] " rguenth at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: chrbr at gcc dot gnu.org @ 2012-02-27 14:03 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 52400
           Summary: lto1: ICE with extern on static linkage
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: chrbr@gcc.gnu.org


Compiling the attached file

g++ -O0  -flto foo.cc
lto1: internal compiler error: in lto_record_renamed_decl, at
lto-section-in.c:330

removing the external declaration for f4() makes the test pass.


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

* [Bug lto/52400] lto1: ICE with extern on static linkage
  2012-02-27 14:03 [Bug lto/52400] New: lto1: ICE with extern on static linkage chrbr at gcc dot gnu.org
@ 2012-02-27 14:20 ` rguenth at gcc dot gnu.org
  2012-02-27 14:37 ` chrbr at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-02-27 14:20 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2012-02-27
     Ever Confirmed|0                           |1

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-02-27 14:14:27 UTC ---
Attachment missing.


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

* [Bug lto/52400] lto1: ICE with extern on static linkage
  2012-02-27 14:03 [Bug lto/52400] New: lto1: ICE with extern on static linkage chrbr at gcc dot gnu.org
  2012-02-27 14:20 ` [Bug lto/52400] " rguenth at gcc dot gnu.org
@ 2012-02-27 14:37 ` chrbr at gcc dot gnu.org
  2012-02-27 14:51 ` [Bug lto/52400] [4.6/4.7 Regression] " rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: chrbr at gcc dot gnu.org @ 2012-02-27 14:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from chrbr at gcc dot gnu.org 2012-02-27 14:20:29 UTC ---
Created attachment 26763
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26763
testcase


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

* [Bug lto/52400] [4.6/4.7 Regression] lto1: ICE with extern on static linkage
  2012-02-27 14:03 [Bug lto/52400] New: lto1: ICE with extern on static linkage chrbr at gcc dot gnu.org
  2012-02-27 14:20 ` [Bug lto/52400] " rguenth at gcc dot gnu.org
  2012-02-27 14:37 ` chrbr at gcc dot gnu.org
@ 2012-02-27 14:51 ` rguenth at gcc dot gnu.org
  2012-02-28  9:14 ` rguenth at gcc dot gnu.org
  2012-02-28  9:16 ` [Bug lto/52400] [4.6 " rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-02-27 14:51 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |ASSIGNED
                 CC|                            |hubicka at gcc dot gnu.org,
                   |                            |rguenth at gcc dot gnu.org
      Known to work|                            |4.5.3
         AssignedTo|unassigned at gcc dot       |rguenth at gcc dot gnu.org
                   |gnu.org                     |
   Target Milestone|---                         |4.6.4
            Summary|lto1: ICE with extern on    |[4.6/4.7 Regression] lto1:
                   |static linkage              |ICE with extern on static
                   |                            |linkage
      Known to fail|                            |4.6.2, 4.7.0

--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-02-27 14:50:37 UTC ---
Confirmed.  We do not handle having multiple functions with the same name
(but pulled in into different contexts) well.  I suppose the particular
error can be fixed by

Index: gcc/lto/lto.c
===================================================================
--- gcc/lto/lto.c       (revision 184591)
+++ gcc/lto/lto.c       (working copy)
@@ -689,13 +689,6 @@ lto_register_function_decl_in_symtab (st
          lto_record_renamed_decl (data_in->file_data,
                                   IDENTIFIER_POINTER (old_assembler_name),
                                   IDENTIFIER_POINTER (new_assembler_name));
-
-         /* Also register the reverse mapping so that we can find the
-            new name given to an existing assembler name (used when
-            restoring alias pairs in input_constructors_or_inits.  */
-         lto_record_renamed_decl (data_in->file_data,
-                                  IDENTIFIER_POINTER (new_assembler_name),
-                                  IDENTIFIER_POINTER (old_assembler_name));
        }
     }

as the reverse mapping should be unused now with the alias-pair rewrite. 
Honza?


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

* [Bug lto/52400] [4.6/4.7 Regression] lto1: ICE with extern on static linkage
  2012-02-27 14:03 [Bug lto/52400] New: lto1: ICE with extern on static linkage chrbr at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2012-02-27 14:51 ` [Bug lto/52400] [4.6/4.7 Regression] " rguenth at gcc dot gnu.org
@ 2012-02-28  9:14 ` rguenth at gcc dot gnu.org
  2012-02-28  9:16 ` [Bug lto/52400] [4.6 " rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-02-28  9:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-02-28 09:13:44 UTC ---
Author: rguenth
Date: Tue Feb 28 09:13:40 2012
New Revision: 184618

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=184618
Log:
2012-02-28  Richard Guenther  <rguenther@suse.de>

    PR lto/52400
    * lto.c (lto_register_function_decl_in_symtab): Do not register
    a reverse renamed decl mapping.

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

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


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

* [Bug lto/52400] [4.6 Regression] lto1: ICE with extern on static linkage
  2012-02-27 14:03 [Bug lto/52400] New: lto1: ICE with extern on static linkage chrbr at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2012-02-28  9:14 ` rguenth at gcc dot gnu.org
@ 2012-02-28  9:16 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-02-28  9:16 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
      Known to work|                            |4.7.0
         Resolution|                            |FIXED
   Target Milestone|4.6.4                       |4.7.0
            Summary|[4.6/4.7 Regression] lto1:  |[4.6 Regression] lto1: ICE
                   |ICE with extern on static   |with extern on static
                   |linkage                     |linkage
      Known to fail|4.7.0                       |

--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-02-28 09:14:35 UTC ---
Fixed for 4.7.  The fix is not backportable.


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

end of thread, other threads:[~2012-02-28  9:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-27 14:03 [Bug lto/52400] New: lto1: ICE with extern on static linkage chrbr at gcc dot gnu.org
2012-02-27 14:20 ` [Bug lto/52400] " rguenth at gcc dot gnu.org
2012-02-27 14:37 ` chrbr at gcc dot gnu.org
2012-02-27 14:51 ` [Bug lto/52400] [4.6/4.7 Regression] " rguenth at gcc dot gnu.org
2012-02-28  9:14 ` rguenth at gcc dot gnu.org
2012-02-28  9:16 ` [Bug lto/52400] [4.6 " 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).