https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103696
--- Comment #1 from Ivan Machugovskiy ---
Obligatory info dump. I managed to reproduce this on G++ 9.3.0 and G++ 10.3.0
locally, and on G++ trunk on Godbolt (see https://godbolt.org/z/Y5Kr3KfjW).
This is probably a longstanding bug.
$ g++ -v
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103696
Bug ID: 103696
Summary: Lambda functions are not inlined under certain
optimization pragmas
Product: gcc
Version: 11.2.1
Status: UNCONFIRMED
Severity: normal