public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/105227] New: [12 Regression] ICE in type_in_anonymous_namespace_p, at ipa-utils.h:233
@ 2022-04-11 16:51 gscfq@t-online.de
  2022-04-11 17:39 ` [Bug tree-optimization/105227] " jason at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: gscfq@t-online.de @ 2022-04-11 16:51 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 105227
           Summary: [12 Regression] ICE in type_in_anonymous_namespace_p,
                    at ipa-utils.h:233
           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: ---

This started between 20211114 and 20211121,
with file g++.dg/ext/attr-alias-2.C at -Ofast :


$ g++-12-20211114 -c attr-alias-2.C -fPIC -flto -Ofast
$ g++-12-20220410 -c attr-alias-2.C -fPIC -flto -O3
$
$ g++-12-20220410 -c attr-alias-2.C -fPIC -flto -Ofast
during IPA pass: visibility
attr-alias-2.C:37:1: internal compiler error: Segmentation fault
   37 | }
      | ^
0xda8c2f crash_signal
        ../../gcc/toplev.cc:322
0xb58561 type_in_anonymous_namespace_p(tree_node const*)
        ../../gcc/ipa-utils.h:233
0xb58561 maybe_record_node
        ../../gcc/ipa-devirt.cc:2427
0xb5a918 possible_polymorphic_call_targets(tree_node*, long,
ipa_polymorphic_call_context, bool*, void**, bool)
        ../../gcc/ipa-devirt.cc:3241
0xbd28b9 possible_polymorphic_call_targets(cgraph_edge*, bool*, void**, bool)
        ../../gcc/ipa-utils.h:131
0xbd28b9 walk_polymorphic_call_targets
        ../../gcc/ipa.cc:183
0xbd28b9 symbol_table::remove_unreachable_nodes(_IO_FILE*)
        ../../gcc/ipa.cc:431
0xccedbd execute_todo
        ../../gcc/passes.cc:2153

---

$ g++-12-20220410 -c attr-alias-2.C -fPIC -flto -Ofast   # test version
during IPA pass: visibility
attr-alias-2.C:37:1: internal compiler error: tree check: expected class
'type', have 'declaration' (translation_unit_decl) in type_with_linkage_p, at
ipa-utils.h:198
   37 | }
      | ^
0x6c96a5 tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
        ../../gcc/tree.cc:8829
0xe1a61a tree_class_check(tree_node const*, tree_code_class, char const*, int,
char const*)
        ../../gcc/tree.h:3836
0xe1a61a type_with_linkage_p(tree_node const*)
        ../../gcc/ipa-utils.h:198
0xe1a61a type_in_anonymous_namespace_p(tree_node const*)
        ../../gcc/ipa-utils.h:229
0xe14011 maybe_record_node
        ../../gcc/ipa-devirt.cc:2427
0xe16221 possible_polymorphic_call_targets(tree_node*, long,
ipa_polymorphic_call_context, bool*, void**, bool)
        ../../gcc/ipa-devirt.cc:3241
0xea0837 possible_polymorphic_call_targets(cgraph_edge*, bool*, void**, bool)
        ../../gcc/ipa-utils.h:131
0xea0837 walk_polymorphic_call_targets
        ../../gcc/ipa.cc:183
0xea0837 symbol_table::remove_unreachable_nodes(_IO_FILE*)
        ../../gcc/ipa.cc:431
0xfd533d execute_todo
        ../../gcc/passes.cc:2153

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

* [Bug tree-optimization/105227] [12 Regression] ICE in type_in_anonymous_namespace_p, at ipa-utils.h:233
  2022-04-11 16:51 [Bug c++/105227] New: [12 Regression] ICE in type_in_anonymous_namespace_p, at ipa-utils.h:233 gscfq@t-online.de
@ 2022-04-11 17:39 ` jason at gcc dot gnu.org
  2022-04-11 18:49 ` [Bug ipa/105227] " pinskia at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2022-04-11 17:39 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2022-04-11
           Priority|P3                          |P1
          Component|c++                         |tree-optimization
                 CC|                            |jason at gcc dot gnu.org

--- Comment #1 from Jason Merrill <jason at gcc dot gnu.org> ---
Confirmed.

The problem seems to be that free_lang_data_in_decl changes DECL_CONTEXT of
Klass::implementation to be the global scope because it isn't virtual, but
eventually update_vtable_references changes the vtable entry for Klass::magic
to refer to (a local alias for) Klass::implementation, so maybe_record_node's
attempts to ask about its class context fail.

Currently free_lang_data_in_decl works around this issue for destructors
specifically, but not for other member functions.

Not sure if the component should be tree-optimization or lto, but it isn't a
front-end issue.

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

* [Bug ipa/105227] [12 Regression] ICE in type_in_anonymous_namespace_p, at ipa-utils.h:233
  2022-04-11 16:51 [Bug c++/105227] New: [12 Regression] ICE in type_in_anonymous_namespace_p, at ipa-utils.h:233 gscfq@t-online.de
  2022-04-11 17:39 ` [Bug tree-optimization/105227] " jason at gcc dot gnu.org
@ 2022-04-11 18:49 ` pinskia at gcc dot gnu.org
  2022-04-12  6:41 ` [Bug ipa/105227] [9/10/11/12 Regression] ICE in type_in_anonymous_namespace_p, at ipa-utils.h:233 since r9-2502-g143b379d89b12ccc marxin at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-04-11 18:49 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |12.0
          Component|tree-optimization           |ipa
                 CC|                            |marxin at gcc dot gnu.org

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

* [Bug ipa/105227] [9/10/11/12 Regression] ICE in type_in_anonymous_namespace_p, at ipa-utils.h:233 since r9-2502-g143b379d89b12ccc
  2022-04-11 16:51 [Bug c++/105227] New: [12 Regression] ICE in type_in_anonymous_namespace_p, at ipa-utils.h:233 gscfq@t-online.de
  2022-04-11 17:39 ` [Bug tree-optimization/105227] " jason at gcc dot gnu.org
  2022-04-11 18:49 ` [Bug ipa/105227] " pinskia at gcc dot gnu.org
@ 2022-04-12  6:41 ` marxin at gcc dot gnu.org
  2022-04-12 10:52 ` hubicka at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-04-12  6:41 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hubicka at gcc dot gnu.org
   Target Milestone|12.0                        |9.5
           Priority|P1                          |P2
            Summary|[12 Regression] ICE in      |[9/10/11/12 Regression] ICE
                   |type_in_anonymous_namespace |in
                   |_p, at ipa-utils.h:233      |type_in_anonymous_namespace
                   |                            |_p, at ipa-utils.h:233
                   |                            |since
                   |                            |r9-2502-g143b379d89b12ccc

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
With -fno-semantic-interposition, it started with r9-2502-g143b379d89b12ccc.
I'm adjusting priority to P2, hope it's fine?

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

* [Bug ipa/105227] [9/10/11/12 Regression] ICE in type_in_anonymous_namespace_p, at ipa-utils.h:233 since r9-2502-g143b379d89b12ccc
  2022-04-11 16:51 [Bug c++/105227] New: [12 Regression] ICE in type_in_anonymous_namespace_p, at ipa-utils.h:233 gscfq@t-online.de
                   ` (2 preceding siblings ...)
  2022-04-12  6:41 ` [Bug ipa/105227] [9/10/11/12 Regression] ICE in type_in_anonymous_namespace_p, at ipa-utils.h:233 since r9-2502-g143b379d89b12ccc marxin at gcc dot gnu.org
@ 2022-04-12 10:52 ` hubicka at gcc dot gnu.org
  2022-05-27  9:47 ` [Bug ipa/105227] [10/11/12/13 " rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: hubicka at gcc dot gnu.org @ 2022-04-12 10:52 UTC (permalink / raw)
  To: gcc-bugs

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

Jan Hubicka <hubicka at gcc dot gnu.org> changed:

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

--- Comment #3 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
mine.

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

* [Bug ipa/105227] [10/11/12/13 Regression] ICE in type_in_anonymous_namespace_p, at ipa-utils.h:233 since r9-2502-g143b379d89b12ccc
  2022-04-11 16:51 [Bug c++/105227] New: [12 Regression] ICE in type_in_anonymous_namespace_p, at ipa-utils.h:233 gscfq@t-online.de
                   ` (3 preceding siblings ...)
  2022-04-12 10:52 ` hubicka at gcc dot gnu.org
@ 2022-05-27  9:47 ` rguenth at gcc dot gnu.org
  2022-06-28 10:48 ` jakub at gcc dot gnu.org
  2023-07-07 10:43 ` [Bug ipa/105227] [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:47 UTC (permalink / raw)
  To: gcc-bugs

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

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 ipa/105227] [10/11/12/13 Regression] ICE in type_in_anonymous_namespace_p, at ipa-utils.h:233 since r9-2502-g143b379d89b12ccc
  2022-04-11 16:51 [Bug c++/105227] New: [12 Regression] ICE in type_in_anonymous_namespace_p, at ipa-utils.h:233 gscfq@t-online.de
                   ` (4 preceding siblings ...)
  2022-05-27  9:47 ` [Bug ipa/105227] [10/11/12/13 " rguenth at gcc dot gnu.org
@ 2022-06-28 10:48 ` jakub at gcc dot gnu.org
  2023-07-07 10:43 ` [Bug ipa/105227] [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:48 UTC (permalink / raw)
  To: gcc-bugs

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

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 ipa/105227] [11/12/13/14 Regression] ICE in type_in_anonymous_namespace_p, at ipa-utils.h:233 since r9-2502-g143b379d89b12ccc
  2022-04-11 16:51 [Bug c++/105227] New: [12 Regression] ICE in type_in_anonymous_namespace_p, at ipa-utils.h:233 gscfq@t-online.de
                   ` (5 preceding siblings ...)
  2022-06-28 10:48 ` jakub at gcc dot gnu.org
@ 2023-07-07 10:43 ` 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:43 UTC (permalink / raw)
  To: gcc-bugs

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

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:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-11 16:51 [Bug c++/105227] New: [12 Regression] ICE in type_in_anonymous_namespace_p, at ipa-utils.h:233 gscfq@t-online.de
2022-04-11 17:39 ` [Bug tree-optimization/105227] " jason at gcc dot gnu.org
2022-04-11 18:49 ` [Bug ipa/105227] " pinskia at gcc dot gnu.org
2022-04-12  6:41 ` [Bug ipa/105227] [9/10/11/12 Regression] ICE in type_in_anonymous_namespace_p, at ipa-utils.h:233 since r9-2502-g143b379d89b12ccc marxin at gcc dot gnu.org
2022-04-12 10:52 ` hubicka at gcc dot gnu.org
2022-05-27  9:47 ` [Bug ipa/105227] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:48 ` jakub at gcc dot gnu.org
2023-07-07 10:43 ` [Bug ipa/105227] [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).