public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/101533] New: ICE in gen_type_die_with_usage, at dwarf2out.c:25988
@ 2021-07-20 16:54 gscfq@t-online.de
  2021-07-21  6:57 ` [Bug c++/101533] " rguenth at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: gscfq@t-online.de @ 2021-07-20 16:54 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 101533
           Summary: ICE in gen_type_die_with_usage, at dwarf2out.c:25988
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

Affects versions down to at least r5, with option -g :


$ cat z1.cc
template <typename> class T
{
  typedef struct {} a __attribute__((aligned));
};
void f ()
{
  T<int>();
}


$ g++-12-20210718 -c z1.cc
$
$ g++-12-20210718 -c z1.cc -g
z1.cc: In instantiation of 'class T<int>':
z1.cc:7:10:   required from here
z1.cc:1:27: internal compiler error: in gen_type_die_with_usage, at
dwarf2out.c:25988
    1 | template <typename> class T
      |                           ^
0xa138e0 gen_type_die_with_usage
        ../../gcc/dwarf2out.c:25988
0xa13916 gen_type_die
        ../../gcc/dwarf2out.c:26191
0xa13f53 modified_type_die
        ../../gcc/dwarf2out.c:13817
0xa15643 add_type_attribute
        ../../gcc/dwarf2out.c:22131
0xa2b017 gen_typedef_die
        ../../gcc/dwarf2out.c:25867
0xa1010c gen_decl_die
        ../../gcc/dwarf2out.c:26833
0xa11d6f gen_member_die
        ../../gcc/dwarf2out.c:25644
0xa11d6f gen_struct_or_union_type_die
        ../../gcc/dwarf2out.c:25740
0xa11d6f gen_tagged_type_die
        ../../gcc/dwarf2out.c:25941
0xa12fce gen_type_die_with_usage
        ../../gcc/dwarf2out.c:26136
0xa13916 gen_type_die
        ../../gcc/dwarf2out.c:26191
0xa0fc3e gen_decl_die
        ../../gcc/dwarf2out.c:26830
0xa10d8e dwarf2out_decl
        ../../gcc/dwarf2out.c:27385
0xa10f5c dwarf2out_type_decl
        ../../gcc/dwarf2out.c:27103
0xca35d2 rest_of_type_compilation(tree_node*, int)
        ../../gcc/passes.c:339
0x702735 finish_struct_1(tree_node*)
        ../../gcc/cp/class.c:7523
0x850228 instantiate_class_template_1
        ../../gcc/cp/pt.c:12211
0x850228 instantiate_class_template(tree_node*)
        ../../gcc/cp/pt.c:12251
0x884103 complete_type(tree_node*)
        ../../gcc/cp/typeck.c:143
0x8841cd complete_type_or_maybe_complain(tree_node*, tree_node*, int)
        ../../gcc/cp/typeck.c:156

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

* [Bug c++/101533] ICE in gen_type_die_with_usage, at dwarf2out.c:25988
  2021-07-20 16:54 [Bug c++/101533] New: ICE in gen_type_die_with_usage, at dwarf2out.c:25988 gscfq@t-online.de
@ 2021-07-21  6:57 ` rguenth at gcc dot gnu.org
  2021-08-03  4:15 ` [Bug c++/101533] [9/10/11/12 Regression] " pinskia at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-07-21  6:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
25987         /* Prevent broken recursion; we can't hand off to the same type. 
*/
25988         gcc_assert (DECL_ORIGINAL_TYPE (name) != type);

I guess the issue is that we have qualified_type == type but we don't have a
DIE for 'type' yet and that confuses the machinery.

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

* [Bug c++/101533] [9/10/11/12 Regression] ICE in gen_type_die_with_usage, at dwarf2out.c:25988
  2021-07-20 16:54 [Bug c++/101533] New: ICE in gen_type_die_with_usage, at dwarf2out.c:25988 gscfq@t-online.de
  2021-07-21  6:57 ` [Bug c++/101533] " rguenth at gcc dot gnu.org
@ 2021-08-03  4:15 ` pinskia at gcc dot gnu.org
  2021-08-03  4:35 ` pinskia at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-03  4:15 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2021-08-03
      Known to work|                            |4.4.7
      Known to fail|                            |4.5.3
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
            Summary|ICE in                      |[9/10/11/12 Regression] ICE
                   |gen_type_die_with_usage, at |in gen_type_die_with_usage,
                   |dwarf2out.c:25988           |at dwarf2out.c:25988
   Target Milestone|---                         |9.5

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.

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

* [Bug c++/101533] [9/10/11/12 Regression] ICE in gen_type_die_with_usage, at dwarf2out.c:25988
  2021-07-20 16:54 [Bug c++/101533] New: ICE in gen_type_die_with_usage, at dwarf2out.c:25988 gscfq@t-online.de
  2021-07-21  6:57 ` [Bug c++/101533] " rguenth at gcc dot gnu.org
  2021-08-03  4:15 ` [Bug c++/101533] [9/10/11/12 Regression] " pinskia at gcc dot gnu.org
@ 2021-08-03  4:35 ` pinskia at gcc dot gnu.org
  2022-01-17 14:00 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-03  4:35 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=42364

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This works though:
  typedef struct __attribute__((aligned))   {} a ;


My bet is this started to ICE when attribute support was added to templates.

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

* [Bug c++/101533] [9/10/11/12 Regression] ICE in gen_type_die_with_usage, at dwarf2out.c:25988
  2021-07-20 16:54 [Bug c++/101533] New: ICE in gen_type_die_with_usage, at dwarf2out.c:25988 gscfq@t-online.de
                   ` (2 preceding siblings ...)
  2021-08-03  4:35 ` pinskia at gcc dot gnu.org
@ 2022-01-17 14:00 ` rguenth at gcc dot gnu.org
  2022-05-27  9:45 ` [Bug c++/101533] [10/11/12/13 " rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-01-17 14:00 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2

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

* [Bug c++/101533] [10/11/12/13 Regression] ICE in gen_type_die_with_usage, at dwarf2out.c:25988
  2021-07-20 16:54 [Bug c++/101533] New: ICE in gen_type_die_with_usage, at dwarf2out.c:25988 gscfq@t-online.de
                   ` (3 preceding siblings ...)
  2022-01-17 14:00 ` rguenth at gcc dot gnu.org
@ 2022-05-27  9:45 ` rguenth at gcc dot gnu.org
  2022-06-28 10:45 ` jakub at gcc dot gnu.org
  2023-07-07 10:40 ` [Bug c++/101533] [11/12/13/14 " rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-27  9:45 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|9.5                         |10.4

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

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

* [Bug c++/101533] [10/11/12/13 Regression] ICE in gen_type_die_with_usage, at dwarf2out.c:25988
  2021-07-20 16:54 [Bug c++/101533] New: ICE in gen_type_die_with_usage, at dwarf2out.c:25988 gscfq@t-online.de
                   ` (4 preceding siblings ...)
  2022-05-27  9:45 ` [Bug c++/101533] [10/11/12/13 " rguenth at gcc dot gnu.org
@ 2022-06-28 10:45 ` jakub at gcc dot gnu.org
  2023-07-07 10:40 ` [Bug c++/101533] [11/12/13/14 " rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-28 10:45 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 10.4 is being released, retargeting bugs to GCC 10.5.

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

* [Bug c++/101533] [11/12/13/14 Regression] ICE in gen_type_die_with_usage, at dwarf2out.c:25988
  2021-07-20 16:54 [Bug c++/101533] New: ICE in gen_type_die_with_usage, at dwarf2out.c:25988 gscfq@t-online.de
                   ` (5 preceding siblings ...)
  2022-06-28 10:45 ` jakub at gcc dot gnu.org
@ 2023-07-07 10:40 ` rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07 10:40 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

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

end of thread, other threads:[~2023-07-07 10:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-20 16:54 [Bug c++/101533] New: ICE in gen_type_die_with_usage, at dwarf2out.c:25988 gscfq@t-online.de
2021-07-21  6:57 ` [Bug c++/101533] " rguenth at gcc dot gnu.org
2021-08-03  4:15 ` [Bug c++/101533] [9/10/11/12 Regression] " pinskia at gcc dot gnu.org
2021-08-03  4:35 ` pinskia at gcc dot gnu.org
2022-01-17 14:00 ` rguenth at gcc dot gnu.org
2022-05-27  9:45 ` [Bug c++/101533] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:45 ` jakub at gcc dot gnu.org
2023-07-07 10:40 ` [Bug c++/101533] [11/12/13/14 " 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).