[Bug other/95913] New: Capturing lambdas inlining behavior changed in GCC 10.x

leonid.satanovsky at gmail dot com gcc-bugzilla@gcc.gnu.org
Fri Jun 26 14:12:45 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95913

            Bug ID: 95913
           Summary: Capturing lambdas inlining behavior changed in GCC
                    10.x
           Product: gcc
           Version: 10.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: leonid.satanovsky at gmail dot com
  Target Milestone: ---

Greetings!

There is a bug suspicion, and I wanted to report it by the following example.

https://godbolt.org/z/m6g3Ug  

GCCs 9.x and older inline capturing lambdas for the case in example even on -O1
GCC 10.1 always inlines only on -O3. On -O2 inlines it only if capturing lambda
is called < 3 times in a row.


Best regards, Leonid.


More information about the Gcc-bugs mailing list