public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ipa/102723] New: ICE in get_partitioning_class, at symtab.c:2092
@ 2021-10-13  2:58 asolokha at gmx dot com
  2021-10-13  3:22 ` [Bug c++/102723] " pinskia at gcc dot gnu.org
  2021-10-13  3:30 ` pinskia at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: asolokha at gmx dot com @ 2021-10-13  2:58 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 102723
           Summary: ICE in get_partitioning_class, at symtab.c:2092
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code, lto
          Severity: normal
          Priority: P3
         Component: ipa
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---

g++-12.0.0-alpha20211010 snapshot (g:74ccca380cde5e79e082d39214b306a90ded0344)
ICEs when compiling the following testcase, reduced from
test/SemaTemplate/instantiate-static-local.cpp from the clang 12.0.0 test
suite, w/ -flto:

template <int &R>
struct A {
  static constexpr int &value = R;
};

template <typename = void>
auto
S ()
{
  static int s;
  return A<s>{};
}

auto s = decltype (S ())::value;

% g++-12.0.0 -flto -c bxra81wv.cpp
during IPA pass: modref
bxra81wv.cpp:14:32: internal compiler error: in get_partitioning_class, at
symtab.c:2092
   14 | auto s = decltype (S ())::value;
      |                                ^
0x75e687 symtab_node::get_partitioning_class()
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211010/work/gcc-12-20211010/gcc/symtab.c:2092
0xfe627b lto_output_varpool_node
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211010/work/gcc-12-20211010/gcc/lto-cgraph.c:620
0xfe627b output_symtab()
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211010/work/gcc-12-20211010/gcc/lto-cgraph.c:987
0xffc874 lto_output()
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211010/work/gcc-12-20211010/gcc/lto-streamer-out.c:2813
0x1089881 write_lto
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211010/work/gcc-12-20211010/gcc/passes.c:2680
0x1089881 ipa_write_summaries_1
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211010/work/gcc-12-20211010/gcc/passes.c:2744
0x1089881 ipa_write_summaries()
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211010/work/gcc-12-20211010/gcc/passes.c:2800
0xcd95c2 ipa_passes
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211010/work/gcc-12-20211010/gcc/cgraphunit.c:2202
0xcd95c2 symbol_table::compile()
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211010/work/gcc-12-20211010/gcc/cgraphunit.c:2289
0xcdc137 symbol_table::compile()
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211010/work/gcc-12-20211010/gcc/cgraphunit.c:2269
0xcdc137 symbol_table::finalize_compilation_unit()
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211010/work/gcc-12-20211010/gcc/cgraphunit.c:2537

And g++ 11 ICEs differently:

during IPA pass: modref
bxra81wv.cpp:14:32: internal compiler error: tree code 'template_type_parm' is
not supported in LTO streams
   14 | auto s = decltype (S ())::value;
      |                                ^
0x164fe9c internal_error(char const*, ...)
0xba7403 DFS::DFS(output_block*, tree_node*, bool, bool, bool)
0xbd0da8 lto_output_tree(output_block*, tree_node*, bool, bool)
0xbb0c41 produce_asm_for_decls()
0x904b26 symbol_table::finalize_compilation_unit()

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

* [Bug c++/102723] ICE in get_partitioning_class, at symtab.c:2092
  2021-10-13  2:58 [Bug ipa/102723] New: ICE in get_partitioning_class, at symtab.c:2092 asolokha at gmx dot com
@ 2021-10-13  3:22 ` pinskia at gcc dot gnu.org
  2021-10-13  3:30 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-10-13  3:22 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|ipa                         |c++

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
template_type_parm should not leak to the middle-end from the front-end.

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

* [Bug c++/102723] ICE in get_partitioning_class, at symtab.c:2092
  2021-10-13  2:58 [Bug ipa/102723] New: ICE in get_partitioning_class, at symtab.c:2092 asolokha at gmx dot com
  2021-10-13  3:22 ` [Bug c++/102723] " pinskia at gcc dot gnu.org
@ 2021-10-13  3:30 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-10-13  3:30 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This is a dup of bug 95686.  Note the problem is seen even without LTO if you
add a main function.  There is an undefined symbol.  The ICE and undefined
symbols are the symptom of the same problem.

*** This bug has been marked as a duplicate of bug 95686 ***

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

end of thread, other threads:[~2021-10-13  3:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-13  2:58 [Bug ipa/102723] New: ICE in get_partitioning_class, at symtab.c:2092 asolokha at gmx dot com
2021-10-13  3:22 ` [Bug c++/102723] " pinskia at gcc dot gnu.org
2021-10-13  3:30 ` pinskia 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).