public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/112718] New: [11/12/13/14 Regression] ICE: in add_dwarf_attr, at dwarf2out.cc:4501 with -g -fdebug-types-section -flto -fno-use-linker-plugin
@ 2023-11-27  6:50 zsojka at seznam dot cz
  2023-11-27  8:17 ` [Bug debug/112718] [11/12/13/14 Regression] ICE: in add_dwarf_attr, at dwarf2out.cc:4501 with -g -fdebug-types-section -flto -ffat-lto-objects rguenth at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: zsojka at seznam dot cz @ 2023-11-27  6:50 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 112718
           Summary: [11/12/13/14 Regression] ICE: in add_dwarf_attr, at
                    dwarf2out.cc:4501 with -g -fdebug-types-section -flto
                    -fno-use-linker-plugin
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu

Created attachment 56692
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56692&action=edit
reduced testcase

Compiler output:
$ x86_64-pc-linux-gnu-gcc -g -fdebug-types-section -flto -fno-use-linker-plugin
testcase.c
testcase.c:8:1: internal compiler error: in add_dwarf_attr, at
dwarf2out.cc:4501
    8 | } _EC_X9_62_PRIME_192V3;
      | ^
0x73f5ce add_dwarf_attr
        /repo/gcc-trunk/gcc/dwarf2out.cc:4501
0x74151f add_dwarf_attr
        /repo/gcc-trunk/gcc/vec.h:715
0x74151f add_AT_die_ref
        /repo/gcc-trunk/gcc/dwarf2out.cc:4925
0x74151f add_sibling_attributes
        /repo/gcc-trunk/gcc/dwarf2out.cc:8983
0x101524b add_sibling_attributes
        /repo/gcc-trunk/gcc/dwarf2out.cc:8985
0x1051b4f dwarf2out_finish
        /repo/gcc-trunk/gcc/dwarf2out.cc:32318
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

$ x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r14-5865-20231127072427-gb6db325ac3e-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/14.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--disable-bootstrap --with-cloog --with-ppl --with-isl
--build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu
--target=x86_64-pc-linux-gnu --with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r14-5865-20231127072427-gb6db325ac3e-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20231127 (experimental) (GCC)

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

* [Bug debug/112718] [11/12/13/14 Regression] ICE: in add_dwarf_attr, at dwarf2out.cc:4501 with -g -fdebug-types-section -flto -ffat-lto-objects
  2023-11-27  6:50 [Bug debug/112718] New: [11/12/13/14 Regression] ICE: in add_dwarf_attr, at dwarf2out.cc:4501 with -g -fdebug-types-section -flto -fno-use-linker-plugin zsojka at seznam dot cz
@ 2023-11-27  8:17 ` rguenth at gcc dot gnu.org
  2024-01-22 14:46 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-11-27  8:17 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
            Summary|[11/12/13/14 Regression]    |[11/12/13/14 Regression]
                   |ICE: in add_dwarf_attr, at  |ICE: in add_dwarf_attr, at
                   |dwarf2out.cc:4501 with -g   |dwarf2out.cc:4501 with -g
                   |-fdebug-types-section -flto |-fdebug-types-section -flto
                   |-fno-use-linker-plugin      |-ffat-lto-objects
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2023-11-27
   Target Milestone|---                         |11.5

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.  Same with -g -fdebug-types-section -flto -ffat-lto-objects

Note -fdebug-types-section has known issues with LTO, it shouldn't be used.

In fact I asked whether we can remove it ...

I think I've seen this particular bug before as well.

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

* [Bug debug/112718] [11/12/13/14 Regression] ICE: in add_dwarf_attr, at dwarf2out.cc:4501 with -g -fdebug-types-section -flto -ffat-lto-objects
  2023-11-27  6:50 [Bug debug/112718] New: [11/12/13/14 Regression] ICE: in add_dwarf_attr, at dwarf2out.cc:4501 with -g -fdebug-types-section -flto -fno-use-linker-plugin zsojka at seznam dot cz
  2023-11-27  8:17 ` [Bug debug/112718] [11/12/13/14 Regression] ICE: in add_dwarf_attr, at dwarf2out.cc:4501 with -g -fdebug-types-section -flto -ffat-lto-objects rguenth at gcc dot gnu.org
@ 2024-01-22 14:46 ` rguenth at gcc dot gnu.org
  2024-01-23  7:06 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-01-22 14:46 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
I have a patch, but other issues with -fdebug-types-section and -flto will
prevail.

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

* [Bug debug/112718] [11/12/13/14 Regression] ICE: in add_dwarf_attr, at dwarf2out.cc:4501 with -g -fdebug-types-section -flto -ffat-lto-objects
  2023-11-27  6:50 [Bug debug/112718] New: [11/12/13/14 Regression] ICE: in add_dwarf_attr, at dwarf2out.cc:4501 with -g -fdebug-types-section -flto -fno-use-linker-plugin zsojka at seznam dot cz
  2023-11-27  8:17 ` [Bug debug/112718] [11/12/13/14 Regression] ICE: in add_dwarf_attr, at dwarf2out.cc:4501 with -g -fdebug-types-section -flto -ffat-lto-objects rguenth at gcc dot gnu.org
  2024-01-22 14:46 ` rguenth at gcc dot gnu.org
@ 2024-01-23  7:06 ` cvs-commit at gcc dot gnu.org
  2024-01-23  7:06 ` [Bug debug/112718] [11/12/13 " rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-01-23  7:06 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:7218f5050cb7163edae331f54ca163248ab48bfa

commit r14-8345-g7218f5050cb7163edae331f54ca163248ab48bfa
Author: Richard Biener <rguenther@suse.de>
Date:   Mon Jan 22 15:42:59 2024 +0100

    debug/112718 - reset all type units with -ffat-lto-objects

    When mixing -flto, -ffat-lto-objects and -fdebug-type-section we
    fail to reset all type units after early output resulting in an
    ICE when attempting to add then duplicate sibling attributes.

            PR debug/112718
            * dwarf2out.cc (dwarf2out_finish): Reset all type units
            for the fat part of an LTO compile.

            * gcc.dg/debug/pr112718.c: New testcase.

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

* [Bug debug/112718] [11/12/13 Regression] ICE: in add_dwarf_attr, at dwarf2out.cc:4501 with -g -fdebug-types-section -flto -ffat-lto-objects
  2023-11-27  6:50 [Bug debug/112718] New: [11/12/13/14 Regression] ICE: in add_dwarf_attr, at dwarf2out.cc:4501 with -g -fdebug-types-section -flto -fno-use-linker-plugin zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2024-01-23  7:06 ` cvs-commit at gcc dot gnu.org
@ 2024-01-23  7:06 ` rguenth at gcc dot gnu.org
  2024-03-21 11:49 ` cvs-commit at gcc dot gnu.org
  2024-05-17 11:12 ` [Bug debug/112718] [11/12 " cvs-commit at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-01-23  7:06 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |14.0
           Priority|P3                          |P2
            Summary|[11/12/13/14 Regression]    |[11/12/13 Regression] ICE:
                   |ICE: in add_dwarf_attr, at  |in add_dwarf_attr, at
                   |dwarf2out.cc:4501 with -g   |dwarf2out.cc:4501 with -g
                   |-fdebug-types-section -flto |-fdebug-types-section -flto
                   |-ffat-lto-objects           |-ffat-lto-objects

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed on trunk sofar.

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

* [Bug debug/112718] [11/12/13 Regression] ICE: in add_dwarf_attr, at dwarf2out.cc:4501 with -g -fdebug-types-section -flto -ffat-lto-objects
  2023-11-27  6:50 [Bug debug/112718] New: [11/12/13/14 Regression] ICE: in add_dwarf_attr, at dwarf2out.cc:4501 with -g -fdebug-types-section -flto -fno-use-linker-plugin zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2024-01-23  7:06 ` [Bug debug/112718] [11/12/13 " rguenth at gcc dot gnu.org
@ 2024-03-21 11:49 ` cvs-commit at gcc dot gnu.org
  2024-05-17 11:12 ` [Bug debug/112718] [11/12 " cvs-commit at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-03-21 11:49 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Richard Biener
<rguenth@gcc.gnu.org>:

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

commit r13-8477-gdd1948d467dc25b9b462b173ec40b95f6aa51356
Author: Richard Biener <rguenther@suse.de>
Date:   Mon Jan 22 15:42:59 2024 +0100

    debug/112718 - reset all type units with -ffat-lto-objects

    When mixing -flto, -ffat-lto-objects and -fdebug-type-section we
    fail to reset all type units after early output resulting in an
    ICE when attempting to add then duplicate sibling attributes.

            PR debug/112718
            * dwarf2out.cc (dwarf2out_finish): Reset all type units
            for the fat part of an LTO compile.

            * gcc.dg/debug/pr112718.c: New testcase.

    (cherry picked from commit 7218f5050cb7163edae331f54ca163248ab48bfa)

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

* [Bug debug/112718] [11/12 Regression] ICE: in add_dwarf_attr, at dwarf2out.cc:4501 with -g -fdebug-types-section -flto -ffat-lto-objects
  2023-11-27  6:50 [Bug debug/112718] New: [11/12/13/14 Regression] ICE: in add_dwarf_attr, at dwarf2out.cc:4501 with -g -fdebug-types-section -flto -fno-use-linker-plugin zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  2024-03-21 11:49 ` cvs-commit at gcc dot gnu.org
@ 2024-05-17 11:12 ` cvs-commit at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-05-17 11:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Richard Biener
<rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:1f41e8eef3da1d76c18fe1a93846054c53dc5a47

commit r12-10453-g1f41e8eef3da1d76c18fe1a93846054c53dc5a47
Author: Richard Biener <rguenther@suse.de>
Date:   Mon Jan 22 15:42:59 2024 +0100

    debug/112718 - reset all type units with -ffat-lto-objects

    When mixing -flto, -ffat-lto-objects and -fdebug-type-section we
    fail to reset all type units after early output resulting in an
    ICE when attempting to add then duplicate sibling attributes.

            PR debug/112718
            * dwarf2out.cc (dwarf2out_finish): Reset all type units
            for the fat part of an LTO compile.

            * gcc.dg/debug/pr112718.c: New testcase.

    (cherry picked from commit 7218f5050cb7163edae331f54ca163248ab48bfa)

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

end of thread, other threads:[~2024-05-17 11:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-27  6:50 [Bug debug/112718] New: [11/12/13/14 Regression] ICE: in add_dwarf_attr, at dwarf2out.cc:4501 with -g -fdebug-types-section -flto -fno-use-linker-plugin zsojka at seznam dot cz
2023-11-27  8:17 ` [Bug debug/112718] [11/12/13/14 Regression] ICE: in add_dwarf_attr, at dwarf2out.cc:4501 with -g -fdebug-types-section -flto -ffat-lto-objects rguenth at gcc dot gnu.org
2024-01-22 14:46 ` rguenth at gcc dot gnu.org
2024-01-23  7:06 ` cvs-commit at gcc dot gnu.org
2024-01-23  7:06 ` [Bug debug/112718] [11/12/13 " rguenth at gcc dot gnu.org
2024-03-21 11:49 ` cvs-commit at gcc dot gnu.org
2024-05-17 11:12 ` [Bug debug/112718] [11/12 " cvs-commit 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).