On Tue, 18 May 2021, 00:54 Paul Smith, <paul@xxxxxxxxxxxxxxxxx> wrote: > On Mon, 2021-05-17 at 09:11 -0600, Jeff Law via Gcc-help wrote: > > On 5/17/2021 1:44 AM, Jonathan Wakely via Gcc-help wrote: > > > It performs some simple optimizations that improve performance > > > similarly to -O1. But it avoids transformations that make debugging > > > harder, such as drastically rearranging the code, or GDB telling > > > you a variable had been "optimized out". > > It may optimize out fewer things, I'm not sure, but it certainly still > optimizes out a non-trivial number of variables in my experience... > honestly, too many things to make -Og useful to me. > Yes, I should have said it's *meant* to avoid those optimizations. It didn't always work that way.