public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/110295] New: internal compiler error: in dwarf2out_finish
@ 2023-06-17  8:04 duz@sol-3.de
  2023-06-17 18:49 ` [Bug c++/110295] " pinskia at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: duz@sol-3.de @ 2023-06-17  8:04 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 110295
           Summary: internal compiler error: in dwarf2out_finish
           Product: gcc
           Version: 11.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: duz@sol-3.de
  Target Milestone: ---

Created attachment 55354
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55354&action=edit
Files required as per your bug reporting guidelines.

A small test program to a small caching utility class uses a template template
parameter and a local class.

This is too much for all GCC Versions from 9 to 13 when compiling with -g on
any unixoid system.

See attached file: Here produced with gcc-11.4 on Debian-11.7.

Code is fine and works otherwise.

Cheers, Dirk

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

* [Bug c++/110295] internal compiler error: in dwarf2out_finish
  2023-06-17  8:04 [Bug c++/110295] New: internal compiler error: in dwarf2out_finish duz@sol-3.de
@ 2023-06-17 18:49 ` pinskia at gcc dot gnu.org
  2023-06-17 19:05 ` [Bug c++/110295] [10/11/12/13/14 Regression] ICE in dwarf2out_finish with local class with inherited operator delete in a templated function and -g pinskia at gcc dot gnu.org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-06-17 18:49 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |14.0

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Reducing ...

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

* [Bug c++/110295] [10/11/12/13/14 Regression] ICE in dwarf2out_finish with local class with inherited operator delete in a templated function and -g
  2023-06-17  8:04 [Bug c++/110295] New: internal compiler error: in dwarf2out_finish duz@sol-3.de
  2023-06-17 18:49 ` [Bug c++/110295] " pinskia at gcc dot gnu.org
@ 2023-06-17 19:05 ` pinskia at gcc dot gnu.org
  2023-06-19  7:21 ` rguenth at gcc dot gnu.org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-06-17 19:05 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|internal compiler error: in |[10/11/12/13/14 Regression]
                   |dwarf2out_finish            |ICE in dwarf2out_finish
                   |                            |with local class with
                   |                            |inherited operator delete
                   |                            |in a templated function and
                   |                            |-g
   Target Milestone|---                         |10.5
     Ever confirmed|0                           |1
      Known to work|                            |5.1.0, 5.5.0
      Known to fail|                            |10.1.0, 6.1.0, 7.1.0
             Status|UNCONFIRMED                 |NEW
           Keywords|                            |ice-on-valid-code
   Last reconfirmed|                            |2023-06-17

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Reduced testcase:
```
template <typename T>
struct QCachedT
{
  void operator delete(void *, T *) {}
};
template<int a>
void exercise()
{
  struct thing_t
    : QCachedT<thing_t>
  {
  };
  thing_t *list[1];
  new thing_t;
}
int main() { exercise<1>(); }
```

Note exercise needs to be templated and so does QCachedT.
My guess is thing_t that is for the operator delete is not be subsituted
correctly for the new class when instantiating exercise; it works ok without -g
but when trying to emit debug info, it crashes not knowing the class.

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

* [Bug c++/110295] [10/11/12/13/14 Regression] ICE in dwarf2out_finish with local class with inherited operator delete in a templated function and -g
  2023-06-17  8:04 [Bug c++/110295] New: internal compiler error: in dwarf2out_finish duz@sol-3.de
  2023-06-17 18:49 ` [Bug c++/110295] " pinskia at gcc dot gnu.org
  2023-06-17 19:05 ` [Bug c++/110295] [10/11/12/13/14 Regression] ICE in dwarf2out_finish with local class with inherited operator delete in a templated function and -g pinskia at gcc dot gnu.org
@ 2023-06-19  7:21 ` rguenth at gcc dot gnu.org
  2023-06-20  7:02 ` cvs-commit at gcc dot gnu.org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-06-19  7:21 UTC (permalink / raw)
  To: gcc-bugs

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

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
           Keywords|needs-bisection             |

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
(gdb) p debug_dwarf_die (deferred_asm_name->die)
DIE    0: DW_TAG_subprogram (0x7ffff6e4aaa0)
  abbrev id: 0 offset: 0 mark: 0
  DW_AT_external: 1
  DW_AT_name: "thing_t"
  DW_AT_artificial: 1
  DW_AT_declaration: 1
  DW_AT_object_pointer: die -> 0 (0x7ffff6e4aaf0)
    DIE    0: DW_TAG_formal_parameter (0x7ffff6e4aaf0)
      abbrev id: 0 offset: 0 mark: 0
      DW_AT_type: die -> 0 (0x7ffff6e4a1e0)
      DW_AT_artificial: 1
(gdb) p deferred_asm_name->created_for 
$4 = <function_decl 0x7ffff6feaa00 __ct >

created via

(gdb) bt
#0  add_linkage_name_raw (
    die=<dw_die_ref 0x7ffff6e4aaa0 DW_TAG_subprogram <parent=0x7ffff6e4a230
DW_TAG_structure_type>>, decl=<function_decl 0x7ffff6feaa00 __ct >)
    at /space/rguenther/src/gcc11queue/gcc/dwarf2out.cc:22023
#1  0x00000000013ef18a in add_linkage_name (
    die=<dw_die_ref 0x7ffff6e4aaa0 DW_TAG_subprogram <parent=0x7ffff6e4a230
DW_TAG_structure_type>>, decl=<function_decl 0x7ffff6feaa00 __ct >)
    at /space/rguenther/src/gcc11queue/gcc/dwarf2out.cc:22047
#2  0x00000000013ef2b8 in add_name_and_src_coords_attributes (
    die=<dw_die_ref 0x7ffff6e4aaa0 DW_TAG_subprogram <parent=0x7ffff6e4a230
DW_TAG_structure_type>>, decl=<function_decl 0x7ffff6feaa00 __ct >, 
    no_linkage_name=false)
    at /space/rguenther/src/gcc11queue/gcc/dwarf2out.cc:22072
#3  0x00000000013f363d in gen_subprogram_die (
    decl=<function_decl 0x7ffff6feaa00 __ct >, 
    context_die=<dw_die_ref 0x7ffff6e4a230 DW_TAG_structure_type
<parent=0x7ffff6e4a410 DW_TAG_subprogram>>)
    at /space/rguenther/src/gcc11queue/gcc/dwarf2out.cc:23701
#4  0x00000000013fda8f in gen_decl_die (
    decl=<function_decl 0x7ffff6feaa00 __ct >, origin=<tree 0x0>, 
    ctx=0x7fffffffd1b0, 
    context_die=<dw_die_ref 0x7ffff6e4a230 DW_TAG_structure_type
<parent=0x7ffff6e4a410 DW_TAG_subprogram>>)
#5  0x00000000013f9dc5 in gen_member_die (
    type=<record_type 0x7ffff6fdeb28 thing_t>, 
    context_die=<dw_die_ref 0x7ffff6e4a230 DW_TAG_structure_type
<parent=0x7ffff6e4a410 DW_TAG_subprogram>>)
    at /space/rguenther/src/gcc11queue/gcc/dwarf2out.cc:25858
#6  0x00000000013fa517 in gen_struct_or_union_type_die (
    type=<record_type 0x7ffff6fdeb28 thing_t>, 
    context_die=<dw_die_ref 0x7ffff6e4a410 DW_TAG_subprogram
<parent=0x7ffff6e4a000 DW_TAG_compile_unit>>, usage=DINFO_USAGE_DIR_USE)
    at /space/rguenther/src/gcc11queue/gcc/dwarf2out.cc:25954
#7  0x00000000013faff8 in gen_tagged_type_die (
    type=<record_type 0x7ffff6fdeb28 thing_t>, 
    context_die=<dw_die_ref 0x7ffff6e4a410 DW_TAG_subprogram
<parent=0x7ffff6e4a000 DW_TAG_compile_unit>>, usage=DINFO_USAGE_DIR_USE)
    at /space/rguenther/src/gcc11queue/gcc/dwarf2out.cc:26155
#8  0x00000000013fb94f in gen_type_die_with_usage (
    type=<record_type 0x7ffff6fdeb28 thing_t>, 
    context_die=<dw_die_ref 0x7ffff6e4a410 DW_TAG_subprogram
<parent=0x7ffff6e4a000 DW_TAG_compile_unit>>, usage=DINFO_USAGE_DIR_USE)
    at /space/rguenther/src/gcc11queue/gcc/dwarf2out.cc:26349
#9  0x00000000013fbcec in gen_type_die (
    type=<record_type 0x7ffff6fdeb28 thing_t>, 
    context_die=<dw_die_ref 0x7ffff6e4a410 DW_TAG_subprogram
<parent=0x7ffff6e4a000 DW_TAG_compile_unit>>)
    at /space/rguenther/src/gcc11queue/gcc/dwarf2out.cc:26404
#10 0x00000000013fdc7f in gen_decl_die (
    decl=<type_decl 0x7ffff6fe51c8 thing_t>, origin=<tree 0x0>, ctx=0x0, 
    context_die=<dw_die_ref 0x7ffff6e4a410 DW_TAG_subprogram
<parent=0x7ffff6e4a000 DW_TAG_compile_unit>>)
    at /space/rguenther/src/gcc11queue/gcc/dwarf2out.cc:27043
#11 0x00000000013fc3e4 in process_scope_var (stmt=<block 0x7ffff6fd06c0>, 
    decl=<type_decl 0x7ffff6fe51c8 thing_t>, origin=<tree 0x0>, 
    context_die=<dw_die_ref 0x7ffff6e4a410 DW_TAG_subprogram
<parent=0x7ffff6e4a000 DW_TAG_compile_unit>>)
    at /space/rguenther/src/gcc11queue/gcc/dwarf2out.cc:26557
#12 0x00000000013fc46d in decls_for_scope (stmt=<block 0x7ffff6fd06c0>, 
    context_die=<dw_die_ref 0x7ffff6e4a410 DW_TAG_subprogram
<parent=0x7ffff6e4a000 DW_TAG_compile_unit>>, recurse=true)
    at /space/rguenther/src/gcc11queue/gcc/dwarf2out.cc:26583
#13 0x00000000013f4757 in gen_subprogram_die (
    decl=<function_decl 0x7ffff6fcb900 exercise>, 
    context_die=<dw_die_ref 0x7ffff6e4a000 DW_TAG_compile_unit>)
    at /space/rguenther/src/gcc11queue/gcc/dwarf2out.cc:24087
#14 0x00000000013fda8f in gen_decl_die (
    decl=<function_decl 0x7ffff6fcb900 exercise>, origin=<tree 0x0>, ctx=0x0, 
    context_die=<dw_die_ref 0x7ffff6e4a000 DW_TAG_compile_unit>)
    at /space/rguenther/src/gcc11queue/gcc/dwarf2out.cc:27020
#15 0x00000000013ff1da in dwarf2out_decl (
    decl=<function_decl 0x7ffff6fcb900 exercise>)
    at /space/rguenther/src/gcc11queue/gcc/dwarf2out.cc:27601
#16 0x00000000013ff239 in dwarf2out_function_decl (
    decl=<function_decl 0x7ffff6fcb900 exercise>)
    at /space/rguenther/src/gcc11queue/gcc/dwarf2out.cc:27616
#17 0x00000000014bfa35 in rest_of_handle_final ()
    at /space/rguenther/src/gcc11queue/gcc/final.cc:4274

interestingly we do not arrive at the member DIE creation of the typedef
from the outermost frames.  In fact we create the type DIE for
thing_t before processing the local typedef decl but there it's not
final it seems but simply

 <record_type 0x7ffff6fdeb28 thing_t cxx-odr-p type_5 type_6 VOID
    align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7ffff6fdeb28 context <function_decl 0x7ffff6fcb900 exercise>
    full-name "struct exercise<1>()::thing_t"
    no-binfo use_template=1 interface-unknown
    pointer_to_this <pointer_type 0x7ffff6fded20> chain <type_decl
0x7ffff6fe51c8 thing_t>>

and we then run into

/* Process variable DECL (or variable with origin ORIGIN) within
   block STMT and add it to CONTEXT_DIE.  */
static void
process_scope_var (tree stmt, tree decl, tree origin, dw_die_ref context_die)
{
...
  if (die != NULL && die->die_parent == NULL)
    add_child_die (context_die, die);

because appearantly we have created the DIE in limbo.  Of course when
running into this code late we now have a parent and end up creating
the decl DIE.

I think we want to continue creating the DIE for the decl here.  The following
fixes this issue.

diff --git a/gcc/dwarf2out.cc b/gcc/dwarf2out.cc
index d89ffa66847..e70c47cec8d 100644
--- a/gcc/dwarf2out.cc
+++ b/gcc/dwarf2out.cc
@@ -26533,7 +26533,8 @@ process_scope_var (tree stmt, tree decl, tree origin,
dw_die_ref context_die)

   if (die != NULL && die->die_parent == NULL)
     add_child_die (context_die, die);
-  else if (TREE_CODE (decl_or_origin) == IMPORTED_DECL)
+
+  if (TREE_CODE (decl_or_origin) == IMPORTED_DECL)
     {
       if (early_dwarf)
        dwarf2out_imported_module_or_decl_1 (decl_or_origin, DECL_NAME
(decl_or_origin),

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

* [Bug c++/110295] [10/11/12/13/14 Regression] ICE in dwarf2out_finish with local class with inherited operator delete in a templated function and -g
  2023-06-17  8:04 [Bug c++/110295] New: internal compiler error: in dwarf2out_finish duz@sol-3.de
                   ` (2 preceding siblings ...)
  2023-06-19  7:21 ` rguenth at gcc dot gnu.org
@ 2023-06-20  7:02 ` cvs-commit at gcc dot gnu.org
  2023-06-20  7:02 ` [Bug c++/110295] [10/11/12/13 " rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-06-20  7:02 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from CVS 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:963f87f8a65ec82f503ac4334a3da83b0a8a43b2

commit r14-1958-g963f87f8a65ec82f503ac4334a3da83b0a8a43b2
Author: Richard Biener <rguenther@suse.de>
Date:   Mon Jun 19 09:23:16 2023 +0200

    debug/110295 - mixed up early/late debug for member DIEs

    When we process a scope typedef during early debug creation and
    we have already created a DIE for the type when the decl is
    TYPE_DECL_IS_STUB and this DIE is still in limbo we end up
    just re-parenting that type DIE instead of properly creating
    a DIE for the decl, eventually picking up the now completed
    type and creating DIEs for the members.  Instead this is currently
    defered to the second time we come here, when we annotate the
    DIEs with locations late where now the type DIE is no longer
    in limbo and we fall through doing the job for the decl.

    The following makes sure we perform the necessary early tasks
    for this by continuing with the decl DIE creation after setting
    a parent for the limbo type DIE.

            PR debug/110295
            * dwarf2out.cc (process_scope_var): Continue processing
            the decl after setting a parent in case the existing DIE
            was in limbo.

            * g++.dg/debug/pr110295.C: New testcase.

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

* [Bug c++/110295] [10/11/12/13 Regression] ICE in dwarf2out_finish with local class with inherited operator delete in a templated function and -g
  2023-06-17  8:04 [Bug c++/110295] New: internal compiler error: in dwarf2out_finish duz@sol-3.de
                   ` (3 preceding siblings ...)
  2023-06-20  7:02 ` cvs-commit at gcc dot gnu.org
@ 2023-06-20  7:02 ` rguenth at gcc dot gnu.org
  2023-06-23 10:30 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-06-20  7:02 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |14.0
            Summary|[10/11/12/13/14 Regression] |[10/11/12/13 Regression]
                   |ICE in dwarf2out_finish     |ICE in dwarf2out_finish
                   |with local class with       |with local class with
                   |inherited operator delete   |inherited operator delete
                   |in a templated function and |in a templated function and
                   |-g                          |-g
      Known to fail|14.0                        |
           Priority|P3                          |P2

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

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

* [Bug c++/110295] [10/11/12/13 Regression] ICE in dwarf2out_finish with local class with inherited operator delete in a templated function and -g
  2023-06-17  8:04 [Bug c++/110295] New: internal compiler error: in dwarf2out_finish duz@sol-3.de
                   ` (4 preceding siblings ...)
  2023-06-20  7:02 ` [Bug c++/110295] [10/11/12/13 " rguenth at gcc dot gnu.org
@ 2023-06-23 10:30 ` cvs-commit at gcc dot gnu.org
  2023-07-07 10:45 ` [Bug c++/110295] [11/12 " rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-06-23 10:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from CVS 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:0b69fea6cf12d82f82439f26527ef8721e24411e

commit r13-7468-g0b69fea6cf12d82f82439f26527ef8721e24411e
Author: Richard Biener <rguenther@suse.de>
Date:   Mon Jun 19 09:23:16 2023 +0200

    debug/110295 - mixed up early/late debug for member DIEs

    When we process a scope typedef during early debug creation and
    we have already created a DIE for the type when the decl is
    TYPE_DECL_IS_STUB and this DIE is still in limbo we end up
    just re-parenting that type DIE instead of properly creating
    a DIE for the decl, eventually picking up the now completed
    type and creating DIEs for the members.  Instead this is currently
    defered to the second time we come here, when we annotate the
    DIEs with locations late where now the type DIE is no longer
    in limbo and we fall through doing the job for the decl.

    The following makes sure we perform the necessary early tasks
    for this by continuing with the decl DIE creation after setting
    a parent for the limbo type DIE.

            PR debug/110295
            * dwarf2out.cc (process_scope_var): Continue processing
            the decl after setting a parent in case the existing DIE
            was in limbo.

            * g++.dg/debug/pr110295.C: New testcase.

    (cherry picked from commit 963f87f8a65ec82f503ac4334a3da83b0a8a43b2)

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

* [Bug c++/110295] [11/12 Regression] ICE in dwarf2out_finish with local class with inherited operator delete in a templated function and -g
  2023-06-17  8:04 [Bug c++/110295] New: internal compiler error: in dwarf2out_finish duz@sol-3.de
                   ` (5 preceding siblings ...)
  2023-06-23 10:30 ` cvs-commit at gcc dot gnu.org
@ 2023-07-07 10:45 ` rguenth at gcc dot gnu.org
  2023-11-27 11:34 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07 10:45 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.5                        |11.5

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10 branch is being closed.

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

* [Bug c++/110295] [11/12 Regression] ICE in dwarf2out_finish with local class with inherited operator delete in a templated function and -g
  2023-06-17  8:04 [Bug c++/110295] New: internal compiler error: in dwarf2out_finish duz@sol-3.de
                   ` (6 preceding siblings ...)
  2023-07-07 10:45 ` [Bug c++/110295] [11/12 " rguenth at gcc dot gnu.org
@ 2023-11-27 11:34 ` cvs-commit at gcc dot gnu.org
  2023-12-15 12:18 ` [Bug c++/110295] [11 " cvs-commit at gcc dot gnu.org
  2023-12-15 12:20 ` rguenth at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-11-27 11:34 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 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:60575ee7b016b4d45af3d25d0b8b239ac0fd0e0c

commit r12-10006-g60575ee7b016b4d45af3d25d0b8b239ac0fd0e0c
Author: Richard Biener <rguenther@suse.de>
Date:   Mon Jun 19 09:23:16 2023 +0200

    debug/110295 - mixed up early/late debug for member DIEs

    When we process a scope typedef during early debug creation and
    we have already created a DIE for the type when the decl is
    TYPE_DECL_IS_STUB and this DIE is still in limbo we end up
    just re-parenting that type DIE instead of properly creating
    a DIE for the decl, eventually picking up the now completed
    type and creating DIEs for the members.  Instead this is currently
    defered to the second time we come here, when we annotate the
    DIEs with locations late where now the type DIE is no longer
    in limbo and we fall through doing the job for the decl.

    The following makes sure we perform the necessary early tasks
    for this by continuing with the decl DIE creation after setting
    a parent for the limbo type DIE.

            PR debug/110295
            * dwarf2out.cc (process_scope_var): Continue processing
            the decl after setting a parent in case the existing DIE
            was in limbo.

            * g++.dg/debug/pr110295.C: New testcase.

    (cherry picked from commit 963f87f8a65ec82f503ac4334a3da83b0a8a43b2)

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

* [Bug c++/110295] [11 Regression] ICE in dwarf2out_finish with local class with inherited operator delete in a templated function and -g
  2023-06-17  8:04 [Bug c++/110295] New: internal compiler error: in dwarf2out_finish duz@sol-3.de
                   ` (7 preceding siblings ...)
  2023-11-27 11:34 ` cvs-commit at gcc dot gnu.org
@ 2023-12-15 12:18 ` cvs-commit at gcc dot gnu.org
  2023-12-15 12:20 ` rguenth at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-12-15 12:18 UTC (permalink / raw)
  To: gcc-bugs

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

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

https://gcc.gnu.org/g:01f088741bec84f8fa86f87fdb73db07d5febb0a

commit r11-11140-g01f088741bec84f8fa86f87fdb73db07d5febb0a
Author: Richard Biener <rguenther@suse.de>
Date:   Mon Jun 19 09:23:16 2023 +0200

    debug/110295 - mixed up early/late debug for member DIEs

    When we process a scope typedef during early debug creation and
    we have already created a DIE for the type when the decl is
    TYPE_DECL_IS_STUB and this DIE is still in limbo we end up
    just re-parenting that type DIE instead of properly creating
    a DIE for the decl, eventually picking up the now completed
    type and creating DIEs for the members.  Instead this is currently
    defered to the second time we come here, when we annotate the
    DIEs with locations late where now the type DIE is no longer
    in limbo and we fall through doing the job for the decl.

    The following makes sure we perform the necessary early tasks
    for this by continuing with the decl DIE creation after setting
    a parent for the limbo type DIE.

            PR debug/110295
            * dwarf2out.c (process_scope_var): Continue processing
            the decl after setting a parent in case the existing DIE
            was in limbo.

            * g++.dg/debug/pr110295.C: New testcase.

    (cherry picked from commit 963f87f8a65ec82f503ac4334a3da83b0a8a43b2)

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

* [Bug c++/110295] [11 Regression] ICE in dwarf2out_finish with local class with inherited operator delete in a templated function and -g
  2023-06-17  8:04 [Bug c++/110295] New: internal compiler error: in dwarf2out_finish duz@sol-3.de
                   ` (8 preceding siblings ...)
  2023-12-15 12:18 ` [Bug c++/110295] [11 " cvs-commit at gcc dot gnu.org
@ 2023-12-15 12:20 ` rguenth at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-12-15 12:20 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |11.4.0
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED
      Known to work|                            |11.4.1

--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.

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

end of thread, other threads:[~2023-12-15 12:20 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-17  8:04 [Bug c++/110295] New: internal compiler error: in dwarf2out_finish duz@sol-3.de
2023-06-17 18:49 ` [Bug c++/110295] " pinskia at gcc dot gnu.org
2023-06-17 19:05 ` [Bug c++/110295] [10/11/12/13/14 Regression] ICE in dwarf2out_finish with local class with inherited operator delete in a templated function and -g pinskia at gcc dot gnu.org
2023-06-19  7:21 ` rguenth at gcc dot gnu.org
2023-06-20  7:02 ` cvs-commit at gcc dot gnu.org
2023-06-20  7:02 ` [Bug c++/110295] [10/11/12/13 " rguenth at gcc dot gnu.org
2023-06-23 10:30 ` cvs-commit at gcc dot gnu.org
2023-07-07 10:45 ` [Bug c++/110295] [11/12 " rguenth at gcc dot gnu.org
2023-11-27 11:34 ` cvs-commit at gcc dot gnu.org
2023-12-15 12:18 ` [Bug c++/110295] [11 " cvs-commit at gcc dot gnu.org
2023-12-15 12:20 ` 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).