public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/113777] New: ICE: in add_child_die_after, at dwarf2out.cc:5785 with -g -fsso-struct=big-endian and __attribute__((__hardbool__))
@ 2024-02-05 20:59 zsojka at seznam dot cz
  2024-03-08 15:00 ` [Bug debug/113777] " aoliva at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: zsojka at seznam dot cz @ 2024-02-05 20:59 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 113777
           Summary: ICE: in add_child_die_after, at dwarf2out.cc:5785 with
                    -g -fsso-struct=big-endian and
                    __attribute__((__hardbool__))
           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 57332
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57332&action=edit
reduced testcase

Compiler output:
$ x86_64-pc-linux-gnu-gcc -g -fsso-struct=big-endian testcase.c 
testcase.c:5:1: internal compiler error: in add_child_die_after, at
dwarf2out.cc:5785
    5 | };
      | ^
0x746e52 add_child_die_after
        /repo/gcc-trunk/gcc/dwarf2out.cc:5785
0x746e52 add_child_die_after
        /repo/gcc-trunk/gcc/dwarf2out.cc:5782
0x106c42d gen_enumeration_type_die
        /repo/gcc-trunk/gcc/dwarf2out.cc:22868
0x105399a gen_tagged_type_die
        /repo/gcc-trunk/gcc/dwarf2out.cc:26201
0x105399a gen_type_die_with_usage
        /repo/gcc-trunk/gcc/dwarf2out.cc:26441
0x1056334 gen_type_die
        /repo/gcc-trunk/gcc/dwarf2out.cc:26497
0x1056334 modified_type_die
        /repo/gcc-trunk/gcc/dwarf2out.cc:13985
0x10573b6 add_type_attribute
        /repo/gcc-trunk/gcc/dwarf2out.cc:22388
0x1053d35 gen_array_type_die
        /repo/gcc-trunk/gcc/dwarf2out.cc:22655
0x1053d35 gen_type_die_with_usage
        /repo/gcc-trunk/gcc/dwarf2out.cc:26434
0x10505ed gen_type_die
        /repo/gcc-trunk/gcc/dwarf2out.cc:26497
0x10505ed gen_decl_die
        /repo/gcc-trunk/gcc/dwarf2out.cc:27213
0x1052b96 gen_member_die
        /repo/gcc-trunk/gcc/dwarf2out.cc:25949
0x1052b96 gen_struct_or_union_type_die
        /repo/gcc-trunk/gcc/dwarf2out.cc:26045
0x1052b96 gen_tagged_type_die
        /repo/gcc-trunk/gcc/dwarf2out.cc:26247
0x105399a gen_tagged_type_die
        /repo/gcc-trunk/gcc/dwarf2out.cc:26201
0x105399a gen_type_die_with_usage
        /repo/gcc-trunk/gcc/dwarf2out.cc:26441
0x10506e5 gen_type_die
        /repo/gcc-trunk/gcc/dwarf2out.cc:26497
0x10506e5 gen_decl_die
        /repo/gcc-trunk/gcc/dwarf2out.cc:27137
0x10516bb dwarf2out_decl
        /repo/gcc-trunk/gcc/dwarf2out.cc:27695
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-8810-20240205112830-gf1412546ac8-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/14.0.1/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-8810-20240205112830-gf1412546ac8-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.1 20240205 (experimental) (GCC)

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

* [Bug debug/113777] ICE: in add_child_die_after, at dwarf2out.cc:5785 with -g -fsso-struct=big-endian and __attribute__((__hardbool__))
  2024-02-05 20:59 [Bug debug/113777] New: ICE: in add_child_die_after, at dwarf2out.cc:5785 with -g -fsso-struct=big-endian and __attribute__((__hardbool__)) zsojka at seznam dot cz
@ 2024-03-08 15:00 ` aoliva at gcc dot gnu.org
  2024-03-08 19:27 ` ebotcazou at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: aoliva at gcc dot gnu.org @ 2024-03-08 15:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Alexandre Oliva <aoliva at gcc dot gnu.org> ---
Eric, I think this is yours.

It fails while trying to add a reversed version of the hbool type to the
context of the struct, but the struct doesn't have children yet, and
add_child_die_after requires the context to have children already.  The
assumption that the original, unreversed type was introduced in the same
context doesn't hold.

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

* [Bug debug/113777] ICE: in add_child_die_after, at dwarf2out.cc:5785 with -g -fsso-struct=big-endian and __attribute__((__hardbool__))
  2024-02-05 20:59 [Bug debug/113777] New: ICE: in add_child_die_after, at dwarf2out.cc:5785 with -g -fsso-struct=big-endian and __attribute__((__hardbool__)) zsojka at seznam dot cz
  2024-03-08 15:00 ` [Bug debug/113777] " aoliva at gcc dot gnu.org
@ 2024-03-08 19:27 ` ebotcazou at gcc dot gnu.org
  2024-03-10 21:42 ` ebotcazou at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2024-03-08 19:27 UTC (permalink / raw)
  To: gcc-bugs

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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2024-03-08
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #2 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
This works with __attribute__((may_alias)) though, so what's special with
__attribute__((__hardbool__)) ?

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

* [Bug debug/113777] ICE: in add_child_die_after, at dwarf2out.cc:5785 with -g -fsso-struct=big-endian and __attribute__((__hardbool__))
  2024-02-05 20:59 [Bug debug/113777] New: ICE: in add_child_die_after, at dwarf2out.cc:5785 with -g -fsso-struct=big-endian and __attribute__((__hardbool__)) zsojka at seznam dot cz
  2024-03-08 15:00 ` [Bug debug/113777] " aoliva at gcc dot gnu.org
  2024-03-08 19:27 ` ebotcazou at gcc dot gnu.org
@ 2024-03-10 21:42 ` ebotcazou at gcc dot gnu.org
  2024-03-10 21:46 ` [Bug debug/113777] ICE: in add_child_die_after, at dwarf2out.cc:5785 with -g -fsso-struct " ebotcazou at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2024-03-10 21:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> This works with __attribute__((may_alias)) though, so what's special with
> __attribute__((__hardbool__)) ?

Replying myself: this creates an enumeration type under the hood, so this is a
duplicate of PR debug/113519.

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

* [Bug debug/113777] ICE: in add_child_die_after, at dwarf2out.cc:5785 with -g -fsso-struct  and __attribute__((__hardbool__))
  2024-02-05 20:59 [Bug debug/113777] New: ICE: in add_child_die_after, at dwarf2out.cc:5785 with -g -fsso-struct=big-endian and __attribute__((__hardbool__)) zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2024-03-10 21:42 ` ebotcazou at gcc dot gnu.org
@ 2024-03-10 21:46 ` ebotcazou at gcc dot gnu.org
  2024-03-11  8:30 ` cvs-commit at gcc dot gnu.org
  2024-03-11  8:31 ` ebotcazou at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2024-03-10 21:46 UTC (permalink / raw)
  To: gcc-bugs

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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

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

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

* [Bug debug/113777] ICE: in add_child_die_after, at dwarf2out.cc:5785 with -g -fsso-struct  and __attribute__((__hardbool__))
  2024-02-05 20:59 [Bug debug/113777] New: ICE: in add_child_die_after, at dwarf2out.cc:5785 with -g -fsso-struct=big-endian and __attribute__((__hardbool__)) zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2024-03-10 21:46 ` [Bug debug/113777] ICE: in add_child_die_after, at dwarf2out.cc:5785 with -g -fsso-struct " ebotcazou at gcc dot gnu.org
@ 2024-03-11  8:30 ` cvs-commit at gcc dot gnu.org
  2024-03-11  8:31 ` ebotcazou at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-03-11  8:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Eric Botcazou <ebotcazou@gcc.gnu.org>:

https://gcc.gnu.org/g:0c4df2c3c38ca15c123e9a801b617e63256c83a3

commit r14-9423-g0c4df2c3c38ca15c123e9a801b617e63256c83a3
Author: Eric Botcazou <ebotcazou@adacore.com>
Date:   Mon Mar 11 09:24:50 2024 +0100

    Fix placement of recently implemented DIE

    It's the DIE added for enumeration types with reverse scalar storage order.

    gcc/
            PR debug/113519
            PR debug/113777
            * dwarf2out.cc (gen_enumeration_type_die): In the reverse case,
            generate the DIE with the same parent as in the regular case.

    gcc/testsuite/
            * gcc.dg/sso-20.c: New test.
            * gcc.dg/sso-21.c: Likewise.

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

* [Bug debug/113777] ICE: in add_child_die_after, at dwarf2out.cc:5785 with -g -fsso-struct  and __attribute__((__hardbool__))
  2024-02-05 20:59 [Bug debug/113777] New: ICE: in add_child_die_after, at dwarf2out.cc:5785 with -g -fsso-struct=big-endian and __attribute__((__hardbool__)) zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  2024-03-11  8:30 ` cvs-commit at gcc dot gnu.org
@ 2024-03-11  8:31 ` ebotcazou at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2024-03-11  8:31 UTC (permalink / raw)
  To: gcc-bugs

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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |14.0

--- Comment #5 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
.

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

end of thread, other threads:[~2024-03-11  8:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-05 20:59 [Bug debug/113777] New: ICE: in add_child_die_after, at dwarf2out.cc:5785 with -g -fsso-struct=big-endian and __attribute__((__hardbool__)) zsojka at seznam dot cz
2024-03-08 15:00 ` [Bug debug/113777] " aoliva at gcc dot gnu.org
2024-03-08 19:27 ` ebotcazou at gcc dot gnu.org
2024-03-10 21:42 ` ebotcazou at gcc dot gnu.org
2024-03-10 21:46 ` [Bug debug/113777] ICE: in add_child_die_after, at dwarf2out.cc:5785 with -g -fsso-struct " ebotcazou at gcc dot gnu.org
2024-03-11  8:30 ` cvs-commit at gcc dot gnu.org
2024-03-11  8:31 ` ebotcazou 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).