public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/108802] New: missed inlining of call via pointer to member function
@ 2023-02-15 12:21 pobrn at protonmail dot com
  2023-02-15 12:37 ` [Bug ipa/108802] " rguenth at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: pobrn at protonmail dot com @ 2023-02-15 12:21 UTC (permalink / raw)
  To: gcc-bugs

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.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2024-03-20 16:18 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-15 12:21 [Bug tree-optimization/108802] New: missed inlining of call via pointer to member function pobrn at protonmail dot com
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

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).