public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/107352] New: polymorphic class with destroying delete operator defined causes internal compiler error
@ 2022-10-21 18:40 justus at opentransactions dot org
2022-10-21 18:41 ` [Bug c++/107352] " justus at opentransactions dot org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: justus at opentransactions dot org @ 2022-10-21 18:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107352
Bug ID: 107352
Summary: polymorphic class with destroying delete operator
defined causes internal compiler error
Product: gcc
Version: 12.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: justus at opentransactions dot org
Target Milestone: ---
Created attachment 53746
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53746&action=edit
build errors
Defining a std::destroying_delete_t operator delete for a polymorphic class
causes GCC to fail with "internal compiler error: in build_if_in_charge, at
cp/class.cc:229"
I've tested with 10.3, 11.3, and 12.2 and all of them have the same issue. The
project both builds and passes tests successfully when compiled with clang and
the problem also goes away if I remove the destroying delete operator and put
the code that was in that function at all the places where it would have been
called.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/107352] polymorphic class with destroying delete operator defined causes internal compiler error
2022-10-21 18:40 [Bug c++/107352] New: polymorphic class with destroying delete operator defined causes internal compiler error justus at opentransactions dot org
@ 2022-10-21 18:41 ` justus at opentransactions dot org
2022-10-21 18:41 ` justus at opentransactions dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: justus at opentransactions dot org @ 2022-10-21 18:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107352
--- Comment #1 from Justus Ranvier <justus at opentransactions dot org> ---
Created attachment 53747
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53747&action=edit
preprocessed source
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/107352] polymorphic class with destroying delete operator defined causes internal compiler error
2022-10-21 18:40 [Bug c++/107352] New: polymorphic class with destroying delete operator defined causes internal compiler error justus at opentransactions dot org
2022-10-21 18:41 ` [Bug c++/107352] " justus at opentransactions dot org
@ 2022-10-21 18:41 ` justus at opentransactions dot org
2022-10-21 19:38 ` pinskia at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: justus at opentransactions dot org @ 2022-10-21 18:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107352
--- Comment #2 from Justus Ranvier <justus at opentransactions dot org> ---
Created attachment 53748
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53748&action=edit
another example
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/107352] polymorphic class with destroying delete operator defined causes internal compiler error
2022-10-21 18:40 [Bug c++/107352] New: polymorphic class with destroying delete operator defined causes internal compiler error justus at opentransactions dot org
2022-10-21 18:41 ` [Bug c++/107352] " justus at opentransactions dot org
2022-10-21 18:41 ` justus at opentransactions dot org
@ 2022-10-21 19:38 ` pinskia at gcc dot gnu.org
2022-10-21 19:52 ` justus at opentransactions dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-10-21 19:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107352
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Reducing ...
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/107352] polymorphic class with destroying delete operator defined causes internal compiler error
2022-10-21 18:40 [Bug c++/107352] New: polymorphic class with destroying delete operator defined causes internal compiler error justus at opentransactions dot org
` (2 preceding siblings ...)
2022-10-21 19:38 ` pinskia at gcc dot gnu.org
@ 2022-10-21 19:52 ` justus at opentransactions dot org
2022-10-21 23:20 ` pinskia at gcc dot gnu.org
2022-10-21 23:25 ` pinskia at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: justus at opentransactions dot org @ 2022-10-21 19:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107352
--- Comment #4 from Justus Ranvier <justus at opentransactions dot org> ---
This is a commit in the project where the ice manifests:
https://github.com/justusranvier/opentxs/commit/051fccf04492ceccee34062fcb406d1b830b55f6
This is a commit where I confirmed that not using destroying delete is a
successful workaround:
https://github.com/justusranvier/opentxs/commit/4d832a90860e3e63eb6ba5d0a7330126bfed2e6e
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/107352] polymorphic class with destroying delete operator defined causes internal compiler error
2022-10-21 18:40 [Bug c++/107352] New: polymorphic class with destroying delete operator defined causes internal compiler error justus at opentransactions dot org
` (3 preceding siblings ...)
2022-10-21 19:52 ` justus at opentransactions dot org
@ 2022-10-21 23:20 ` pinskia at gcc dot gnu.org
2022-10-21 23:25 ` pinskia at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-10-21 23:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107352
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |12.2.0, 9.1.0
Last reconfirmed| |2022-10-21
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed reduced testcase:
namespace std { struct destroying_delete_t { }; }
struct hh {
virtual ~hh();
};
struct yy : virtual public hh {
static void operator delete(yy* ptr, std::destroying_delete_t)
noexcept;
};
class jj : virtual public yy {
~jj() override;
};
jj::~jj() = default;
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/107352] polymorphic class with destroying delete operator defined causes internal compiler error
2022-10-21 18:40 [Bug c++/107352] New: polymorphic class with destroying delete operator defined causes internal compiler error justus at opentransactions dot org
` (4 preceding siblings ...)
2022-10-21 23:20 ` pinskia at gcc dot gnu.org
@ 2022-10-21 23:25 ` pinskia at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-10-21 23:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107352
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Slightly more reduced:
namespace std { struct destroying_delete_t { }; }
struct hh {
virtual ~hh();
static void operator delete(hh* ptr, std::destroying_delete_t)
noexcept;
};
class jj : virtual public hh {
~jj(){};
};
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-10-21 23:25 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-21 18:40 [Bug c++/107352] New: polymorphic class with destroying delete operator defined causes internal compiler error justus at opentransactions dot org
2022-10-21 18:41 ` [Bug c++/107352] " justus at opentransactions dot org
2022-10-21 18:41 ` justus at opentransactions dot org
2022-10-21 19:38 ` pinskia at gcc dot gnu.org
2022-10-21 19:52 ` justus at opentransactions dot org
2022-10-21 23:20 ` pinskia at gcc dot gnu.org
2022-10-21 23:25 ` 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).