public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug d/94240] New: [D] lto1: internal compiler error: in add_symbol_to_partition_1, at lto/lto-partition.c:215
@ 2020-03-20 17:41 ibuclaw at gdcproject dot org
  2020-04-01 21:23 ` [Bug d/94240] " ibuclaw at gdcproject dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: ibuclaw at gdcproject dot org @ 2020-03-20 17:41 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 94240
           Summary: [D] lto1: internal compiler error: in
                    add_symbol_to_partition_1, at lto/lto-partition.c:215
           Product: gcc
           Version: 9.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: d
          Assignee: ibuclaw at gdcproject dot org
          Reporter: ibuclaw at gdcproject dot org
  Target Milestone: ---

lto1: internal compiler error: in add_symbol_to_partition_1, at
lto/lto-partition.c:215^M
0x5d0032 add_symbol_to_partition_1^M
        ../../gcc/lto/lto-partition.c:215^M
0x7e261b add_references_to_partition^M
        ../../gcc/lto/lto-partition.c:111^M
0x7e276d add_symbol_to_partition_1^M
        ../../gcc/lto/lto-partition.c:188^M
0x7e4a00 lto_1_to_1_map()^M
        ../../gcc/lto/lto-partition.c:340^M
0x7dc60d do_whole_program_analysis^M
        ../../gcc/lto/lto.c:493^M
0x7dc60d lto_main()^M
        ../../gcc/lto/lto.c:642^M
Please submit a full bug report,^M
with preprocessed source if appropriate.^M
Please include the complete backtrace with any bug report.^M
See <https://gcc.gnu.org/bugs/> for instructions.^M
lto-wrapper: fatal error: /gcc/testsuite/gdc/../../gdc returned 1 exit status^M
compilation terminated.^M
collect2: fatal error: lto-wrapper returned 1 exit status^M
compilation terminated.^M
compiler exited with status 1
FAIL: gdc.dg/lto/ltotests d_lto_ltotests_0.o-d_lto_ltotests_1.o link, -O0 -flto
-flto-partition=1to1 -fno-use-linker-plugin  (internal compiler error)


This has been failing in the testsuite since introduction of the D front-end. 
However weirdly I was not able to reproduce until after upgrading my OS.

A fix is ready for this to be committed to trunk, it should be backported to
the gcc-9 branch as well.

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

* [Bug d/94240] [D] lto1: internal compiler error: in add_symbol_to_partition_1, at lto/lto-partition.c:215
  2020-03-20 17:41 [Bug d/94240] New: [D] lto1: internal compiler error: in add_symbol_to_partition_1, at lto/lto-partition.c:215 ibuclaw at gdcproject dot org
@ 2020-04-01 21:23 ` ibuclaw at gdcproject dot org
  2020-04-07 16:31 ` cvs-commit at gcc dot gnu.org
  2020-04-07 16:32 ` ibuclaw at gdcproject dot org
  2 siblings, 0 replies; 4+ messages in thread
From: ibuclaw at gdcproject dot org @ 2020-04-01 21:23 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Iain Buclaw <ibuclaw at gdcproject dot org> ---
Fix applied for gcc-10 in r10-7314

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

* [Bug d/94240] [D] lto1: internal compiler error: in add_symbol_to_partition_1, at lto/lto-partition.c:215
  2020-03-20 17:41 [Bug d/94240] New: [D] lto1: internal compiler error: in add_symbol_to_partition_1, at lto/lto-partition.c:215 ibuclaw at gdcproject dot org
  2020-04-01 21:23 ` [Bug d/94240] " ibuclaw at gdcproject dot org
@ 2020-04-07 16:31 ` cvs-commit at gcc dot gnu.org
  2020-04-07 16:32 ` ibuclaw at gdcproject dot org
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-04-07 16:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Iain Buclaw
<ibuclaw@gcc.gnu.org>:

https://gcc.gnu.org/g:e926d076f28a91f3ea30bd0bcfa1f25958fdb59e

commit r9-8460-ge926d076f28a91f3ea30bd0bcfa1f25958fdb59e
Author: Iain Buclaw <ibuclaw@gdcproject.org>
Date:   Tue Apr 7 18:02:47 2020 +0200

    d: Fix ICE in add_symbol_to_partition_1, at lto/lto-partition.c:215

    This patch addresses two problems with TypeInfo initializer generation.

    1. D array fields pointing to compiler generated data are referencing
    public symbols with no unique prefix, which can lead to duplicate
    definition errors in some hard to reduce cases.  To avoid name clashes,
    all symbols that are generated for TypeInfo initializers now use the
    assembler name of the TypeInfo decl as a prefix.

    2. An ICE would occur during LTO pass because these same decls are
    considered to be part of the same comdat group as the TypeInfo decl that
    it's referred by, despite itself being neither marked public nor comdat.
    This resulted in decls being added to the LTRANS partition out of order,
    triggering an assert when add_symbol_to_partition_1 attempted to add
    them again.  To remedy, TREE_PUBLIC and DECL_COMDAT are now set on all
    generated symbols.

    gcc/d/ChangeLog:

            PR d/94240
            * typeinfo.cc (class TypeInfoVisitor): Replace type_ field with
decl_.
            (TypeInfoVisitor::TypeInfoVisitor): Set decl_.
            (TypeInfoVisitor::result): Update.
            (TypeInfoVisitor::internal_reference): New function.
            (TypeInfoVisitor::layout_string): Use internal_reference.
            (TypeInfoVisitor::visit (TypeInfoTupleDeclaration *)): Likewise.
            (layout_typeinfo): Construct TypeInfoVisitor with typeinfo decl.
            (layout_classinfo): Likewise.

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

* [Bug d/94240] [D] lto1: internal compiler error: in add_symbol_to_partition_1, at lto/lto-partition.c:215
  2020-03-20 17:41 [Bug d/94240] New: [D] lto1: internal compiler error: in add_symbol_to_partition_1, at lto/lto-partition.c:215 ibuclaw at gdcproject dot org
  2020-04-01 21:23 ` [Bug d/94240] " ibuclaw at gdcproject dot org
  2020-04-07 16:31 ` cvs-commit at gcc dot gnu.org
@ 2020-04-07 16:32 ` ibuclaw at gdcproject dot org
  2 siblings, 0 replies; 4+ messages in thread
From: ibuclaw at gdcproject dot org @ 2020-04-07 16:32 UTC (permalink / raw)
  To: gcc-bugs

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

Iain Buclaw <ibuclaw at gdcproject dot org> changed:

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

--- Comment #3 from Iain Buclaw <ibuclaw at gdcproject dot org> ---
Applied to releases/gcc-9

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

end of thread, other threads:[~2020-04-07 16:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-20 17:41 [Bug d/94240] New: [D] lto1: internal compiler error: in add_symbol_to_partition_1, at lto/lto-partition.c:215 ibuclaw at gdcproject dot org
2020-04-01 21:23 ` [Bug d/94240] " ibuclaw at gdcproject dot org
2020-04-07 16:31 ` cvs-commit at gcc dot gnu.org
2020-04-07 16:32 ` ibuclaw at gdcproject 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).