public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/115007] New: [modules] ICE in maybe_clone_body when calling virtual destructor from instantiated template
@ 2024-05-09 11:20 nshead at gcc dot gnu.org
0 siblings, 0 replies; only message in thread
From: nshead at gcc dot gnu.org @ 2024-05-09 11:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115007
Bug ID: 115007
Summary: [modules] ICE in maybe_clone_body when calling virtual
destructor from instantiated template
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: nshead at gcc dot gnu.org
Blocks: 103524
Target Milestone: ---
The following sample ICEs on trunk:
// a.cpp
module;
struct S {
virtual ~S() = default;
virtual void f() = 0;
};
module M:a;
S *p;
template <typename T> void format(T) { p->~S(); }
template void format(int);
// m.cpp
export module M;
import :a;
'g++ -fmodules-ts -Wno-global-module -S a.cpp m.cpp' results in:
m.cpp: In destructor ‘S@M:a::~S()’:
m.cpp:2:11: internal compiler error: Segmentation fault
2 | import :a;
| ^
0x1bad37f crash_signal
../../gcc/gcc/toplev.cc:319
0x7ffb375cc51f ???
./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
0x1076395 maybe_clone_body(tree_node*)
../../gcc/gcc/cp/optimize.cc:705
0x11e00d9 expand_or_defer_fn_1(tree_node*)
../../gcc/gcc/cp/semantics.cc:5098
0x11e040b expand_or_defer_fn(tree_node*)
../../gcc/gcc/cp/semantics.cc:5133
0xf54666 c_parse_final_cleanups()
../../gcc/gcc/cp/decl2.cc:5362
0x1322ee7 c_common_parse_file()
../../gcc/gcc/c-family/c-opts.cc:1329
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103524
[Bug 103524] [meta-bug] modules issue
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-05-09 11:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-09 11:20 [Bug c++/115007] New: [modules] ICE in maybe_clone_body when calling virtual destructor from instantiated template nshead 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).