public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "pobrn at protonmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/108802] New: missed inlining of call via pointer to member function Date: Wed, 15 Feb 2023 12:21:24 +0000 [thread overview] Message-ID: <bug-108802-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108802 Bug ID: 108802 Summary: missed inlining of call via pointer to member function Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: pobrn at protonmail dot com Target Milestone: --- See https://gcc.godbolt.org/z/j833EGfGY struct A { int f(int x) { return 2 * x; } }; int f1() { A a; return [&](auto&& f) { return (a.*f)(42); } (&A::f); } clang optimizes `f1()` to `return 84`, but gcc does not do so. This seems to have been changed somewhere between gcc 9 and 10 because 9.5 does the inlining but 10.1 does not do it.
next reply other threads:[~2023-02-15 12:21 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-02-15 12:21 pobrn at protonmail dot com [this message] 2023-02-15 12:37 ` [Bug ipa/108802] " rguenth at gcc dot gnu.org 2023-02-15 12:42 ` jakub at gcc dot gnu.org 2023-02-15 16:30 ` [Bug ipa/108802] [10/11/12/13 Regression] " pinskia at gcc dot gnu.org 2023-02-21 12:39 ` rguenth at gcc dot gnu.org 2023-07-07 10:44 ` [Bug ipa/108802] [11/12/13/14 " rguenth at gcc dot gnu.org 2024-02-16 16:35 ` hubicka at gcc dot gnu.org 2024-02-19 17:51 ` jamborm at gcc dot gnu.org 2024-02-21 14:55 ` jamborm at gcc dot gnu.org 2024-03-08 14:57 ` jamborm at gcc dot gnu.org 2024-03-19 21:38 ` cvs-commit at gcc dot gnu.org 2024-03-20 16:18 ` [Bug ipa/108802] [11/12/13 " jamborm 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-108802-4@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).