[Bug c++/63164] unnecessary calls to __dynamic_cast

2025-07-16 Thread tdebock at DRWUK dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63164 --- Comment #22 from Thomas de Bock --- (In reply to Andi Kleen from comment #11) > There is already -fno-semantic-interposition > > Also -flto / -fwhole-program should probably enable it. I think: -fno-semantic-interposition doesn't always gua

[Bug c++/63164] unnecessary calls to __dynamic_cast

2025-07-16 Thread tdebock at DRWUK dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63164 --- Comment #21 from Thomas de Bock --- (In reply to Jakub Jelinek from comment #20) > (In reply to Thomas de Bock from comment #18) > > (In reply to Jason Merrill from comment #17) > > > As I commented at > > > > > > https://inbox.sourceware.or

[Bug c++/63164] unnecessary calls to __dynamic_cast

2025-07-15 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63164 --- Comment #20 from Jakub Jelinek --- (In reply to Thomas de Bock from comment #18) > (In reply to Jason Merrill from comment #17) > > As I commented at > > > > https://inbox.sourceware.org/gcc-patches/75ff8af8-af03-42fa-b68b- > > e6c16a34c...@

[Bug c++/63164] unnecessary calls to __dynamic_cast

2025-07-15 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63164 --- Comment #19 from Jakub Jelinek --- (In reply to Jason Merrill from comment #17) > As I commented at > > https://inbox.sourceware.org/gcc-patches/75ff8af8-af03-42fa-b68b- > e6c16a34c...@redhat.com/ > > we could optimize the dynamic_cast to t

[Bug c++/63164] unnecessary calls to __dynamic_cast

2025-07-15 Thread tdebock at DRWUK dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63164 --- Comment #18 from Thomas de Bock --- (In reply to Jason Merrill from comment #17) > As I commented at > > https://inbox.sourceware.org/gcc-patches/75ff8af8-af03-42fa-b68b- > e6c16a34c...@redhat.com/ > > we could optimize the dynamic_cast to

[Bug c++/63164] unnecessary calls to __dynamic_cast

2025-07-15 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63164 --- Comment #17 from Jason Merrill --- As I commented at https://inbox.sourceware.org/gcc-patches/75ff8af8-af03-42fa-b68b-e6c16a34c...@redhat.com/ we could optimize the dynamic_cast to type_info::operator== instead of vtable comparison.

[Bug c++/63164] unnecessary calls to __dynamic_cast

2025-07-15 Thread tdebock at DRWUK dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63164 --- Comment #16 from Thomas de Bock --- (In reply to Jakub Jelinek from comment #15) > Sure, but that is the only way how to make the optimization reliable. > If the a local type (i.e. mangled for RTTI with * character at the start), > it can jus

[Bug c++/63164] unnecessary calls to __dynamic_cast

2025-07-15 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63164 --- Comment #15 from Jakub Jelinek --- Sure, but that is the only way how to make the optimization reliable. If the a local type (i.e. mangled for RTTI with * character at the start), it can just do the name pointer comparison (or perhaps compare

[Bug c++/63164] unnecessary calls to __dynamic_cast

2025-07-15 Thread tdebock at DRWUK dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63164 --- Comment #14 from Thomas de Bock --- I mean, since it compares the name field from the type_info, at least 1 additional dereference is used in replacing dynamic_cast typecheck with typeinfo::operator== compared to a simple vtable comparison.

[Bug c++/63164] unnecessary calls to __dynamic_cast

2025-07-15 Thread tdebock at DRWUK dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63164 --- Comment #13 from Thomas de Bock --- (In reply to Jakub Jelinek from comment #12) > I'd think it should just optimize __dynamic_cast to > std::type_info::operator== in that case (if that is available) or, if not > (i.e. not included) to >

[Bug c++/63164] unnecessary calls to __dynamic_cast

2025-07-14 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63164 --- Comment #12 from Jakub Jelinek --- I'd think it should just optimize __dynamic_cast to std::type_info::operator== in that case (if that is available) or, if not (i.e. not included) to if (__name == __arg.__name) return true; re

[Bug c++/63164] unnecessary calls to __dynamic_cast

2025-07-14 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63164 Andi Kleen changed: What|Removed |Added CC||andi-gcc at firstfloor dot org --- Comment

[Bug c++/63164] unnecessary calls to __dynamic_cast

2025-07-14 Thread tdebock at DRWUK dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63164 --- Comment #10 from Thomas de Bock --- After some searching and testing, I realise this optimization does in fact malfunction from (at least version 17.0.1) clang when used with dlopen and RTLD_LOCAL, though the optimization can be disabled with

[Bug c++/63164] unnecessary calls to __dynamic_cast

2025-07-08 Thread tdebock at DRWUK dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63164 Thomas de Bock changed: What|Removed |Added CC||tdebock at DRWUK dot com --- Comment #9

[Bug c++/63164] unnecessary calls to __dynamic_cast

2025-07-06 Thread fw at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63164 --- Comment #8 from Florian Weimer --- There's this big comment in typeinfo: // Determine whether typeinfo names for the same type are merged (in which // case comparison can just compare pointers) or not (in which case strings // must be compar

[Bug c++/63164] unnecessary calls to __dynamic_cast

2024-02-07 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63164 Andrew Pinski changed: What|Removed |Added CC||janschultke at googlemail dot com --- C

[Bug c++/63164] unnecessary calls to __dynamic_cast

2022-04-28 Thread avi at scylladb dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63164 --- Comment #6 from Avi Kivity --- I already owe you many beers, but this one is special.

[Bug c++/63164] unnecessary calls to __dynamic_cast

2022-04-28 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63164 --- Comment #5 from Jonathan Wakely --- Avi, in the BZ Preferences you can set "After changing a bug" to "Show the updated bug" instead of jumping to the next one in the list.

[Bug c++/63164] unnecessary calls to __dynamic_cast

2022-04-28 Thread avi at scylladb dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63164 --- Comment #4 from Avi Kivity --- Oops, last comment intended for a separate bug. Curse the bug list thing.

[Bug c++/63164] unnecessary calls to __dynamic_cast

2022-04-28 Thread avi at scylladb dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63164 --- Comment #3 from Avi Kivity --- I have something like this: │ 2680 future<> system_keyspace_make(distributed& dist_db, distributed& dist_ss, sharded& dist_gossiper, db::config& cfg) { │ │ 2681 register_virtual_tabl

[Bug c++/63164] unnecessary calls to __dynamic_cast

2021-05-26 Thread glisse at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63164 Marc Glisse changed: What|Removed |Added Last reconfirmed||2021-05-26 Status|UNCONFIRMED

[Bug c++/63164] unnecessary calls to __dynamic_cast

2019-02-28 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63164 Jakub Jelinek changed: What|Removed |Added CC||hubicka at gcc dot gnu.org,