public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jason at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/107163] [10/11/12/13 Regression] huge Compile time increase when using templated base classes, virtual method, and Wall since r10-2823-g6a07489267e55084 Date: Thu, 23 Mar 2023 19:59:14 +0000 [thread overview] Message-ID: <bug-107163-4-AW4GX7KqTH@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-107163-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107163 Jason Merrill <jason at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jason at gcc dot gnu.org Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |jason at gcc dot gnu.org --- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> --- This isn't specific to virtual functions; the same slowdown can be seen with struct BaseType { int i; }; template< int Seq > class DerivedType : public DerivedType< Seq - 1 > { }; template<> class DerivedType< -1 > : public BaseType { }; int main() { DerivedType< COUNT > d; d.i = 42; } The reference to the base member is represented with a long sequence of COMPONENT_REFs, like d.derived<5>.derived<4>.derived<3>.derived<2>.derived<1>.derived<0>.derived<-1>.base.i = 42 and with r10-2823 we check sequence points across each of those .s, with high algorithmic complexity. Checking across COMPONENT_REF seems unnecessary, since it just selects a subobject of the LHS, there's no additional evaluation.
next prev parent reply other threads:[~2023-03-23 19:59 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-10-05 19:35 [Bug c++/107163] New: Compile time regression when using templated base classes, virtual method, and Wall cfsteefel at arista dot com 2022-10-05 19:49 ` [Bug c++/107163] Compile time regression when using templated base classes, virtual method, and Wall since r10-2823-g6a07489267e55084 marxin at gcc dot gnu.org 2022-10-05 19:53 ` [Bug c++/107163] [10/11/12/13 Regression] huge Compile time " pinskia at gcc dot gnu.org 2022-10-05 20:39 ` [Bug c++/107163] [10/11/12/13 Regression] huge Compile time increase " redi at gcc dot gnu.org 2022-10-18 8:36 ` rguenth at gcc dot gnu.org 2023-03-23 19:59 ` jason at gcc dot gnu.org [this message] 2023-03-28 15:27 ` cvs-commit at gcc dot gnu.org 2023-04-18 20:46 ` [Bug c++/107163] [10/11/12 " cvs-commit at gcc dot gnu.org 2023-04-21 20:28 ` [Bug c++/107163] [10/11 " cvs-commit at gcc dot gnu.org 2023-04-22 0:23 ` cvs-commit at gcc dot gnu.org 2023-07-07 10:44 ` [Bug c++/107163] [11 " rguenth at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-107163-4-AW4GX7KqTH@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).