public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ipa/109185] New: ICE in get_partitioning_class, at symtab.cc:2096
@ 2023-03-18 21:32 asolokha at gmx dot com
2023-03-18 21:54 ` [Bug c++/109185] " pinskia at gcc dot gnu.org
2023-03-19 19:05 ` pinskia at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: asolokha at gmx dot com @ 2023-03-18 21:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109185
Bug ID: 109185
Summary: ICE in get_partitioning_class, at symtab.cc:2096
Product: gcc
Version: 13.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: ---
gcc 13.0.1 20230312 snapshot (g:f23dc726875c26f2c38dfded453aa9beba0b9be9) ICEs
when compiling the following testcase, reduced from
test/SemaTemplate/instantiate-static-local.cpp from the clang 15 test suite, w/
-flto:
namespace use_after_instantiation {
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++-13 -flto -c rls6o5bx.cpp
during IPA pass: modref
rls6o5bx.cpp:10:1: internal compiler error: in get_partitioning_class, at
symtab.cc:2096
10 | }
| ^
0x7a6b1d symtab_node::get_partitioning_class()
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230312/work/gcc-13-20230312/gcc/symtab.cc:2096
0x105d777 lto_output_varpool_node
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230312/work/gcc-13-20230312/gcc/lto-cgraph.cc:631
0x105d777 output_symtab()
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230312/work/gcc-13-20230312/gcc/lto-cgraph.cc:999
0x1074fdc lto_output()
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230312/work/gcc-13-20230312/gcc/lto-streamer-out.cc:2825
0x1103181 write_lto
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230312/work/gcc-13-20230312/gcc/passes.cc:2784
0x1103181 ipa_write_summaries_1
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230312/work/gcc-13-20230312/gcc/passes.cc:2848
0x1103181 ipa_write_summaries()
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230312/work/gcc-13-20230312/gcc/passes.cc:2904
0xd3dd92 ipa_passes
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230312/work/gcc-13-20230312/gcc/cgraphunit.cc:2250
0xd3dd92 symbol_table::compile()
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230312/work/gcc-13-20230312/gcc/cgraphunit.cc:2323
0xd405e7 symbol_table::compile()
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230312/work/gcc-13-20230312/gcc/cgraphunit.cc:2303
0xd405e7 symbol_table::finalize_compilation_unit()
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230312/work/gcc-13-20230312/gcc/cgraphunit.cc:2575
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/109185] ICE in get_partitioning_class, at symtab.cc:2096
2023-03-18 21:32 [Bug ipa/109185] New: ICE in get_partitioning_class, at symtab.cc:2096 asolokha at gmx dot com
@ 2023-03-18 21:54 ` pinskia at gcc dot gnu.org
2023-03-19 19:05 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-03-18 21:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109185
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Keywords|lto |link-failure
Last reconfirmed| |2023-03-18
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed. Also fails with linking this:
```
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;
int main(void)
{
return s;
}
```
So a front-end issue. Most likely not marking S<void>::s as being used.
Note instead of `decltype(S())::value`, I do `S().value`; it works.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/109185] ICE in get_partitioning_class, at symtab.cc:2096
2023-03-18 21:32 [Bug ipa/109185] New: ICE in get_partitioning_class, at symtab.cc:2096 asolokha at gmx dot com
2023-03-18 21:54 ` [Bug c++/109185] " pinskia at gcc dot gnu.org
@ 2023-03-19 19:05 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-03-19 19:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109185
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |DUPLICATE
Status|NEW |RESOLVED
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
exact Dup of bug 95686.
*** 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:[~2023-03-19 19:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-18 21:32 [Bug ipa/109185] New: ICE in get_partitioning_class, at symtab.cc:2096 asolokha at gmx dot com
2023-03-18 21:54 ` [Bug c++/109185] " pinskia at gcc dot gnu.org
2023-03-19 19:05 ` 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).