https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111243
--- Comment #15 from Alex Mohr ---
Thank you Richard B, Richard G, Xi, Jonathan, Jakub, and Eric for all the great
info. Much appreciated.
With more experience using '-Og -fno-inline' I've found that sometimes
inspecting local variables doesn'
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111243
--- Comment #10 from Alex Mohr ---
(In reply to Xi Ruoyao from comment #9)
> I believe the only real issue is imprecise documentation: "It is a better
> choice than -O0" has some caveats and it's not always true.
Is there a way to explicitly en
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111243
--- Comment #8 from Alex Mohr ---
(In reply to Jonathan Wakely from comment #5)
> A 4x slowdown isn't really acceptable IMHO. At that point, why not just use
> -O0 instead?
I've been using -O0 for years. I was trying to move to -Og because of
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111243
--- Comment #2 from Alex Mohr ---
Thanks much for looking at this, Richard.
I definitely understand what you're driving at with regard to stepping into
lots of C++ abstraction stuff. But I think it gets blurry trying to
distinguish what's inte
: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: amohr at amohr dot org
Target Milestone: ---
The docs recommend using -Og for debug builds, but that option inlines
functions which makes single-stepping in debuggers
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82803
--- Comment #3 from Alex Mohr ---
FWIW a loop is not required. This generates 4 calls to __tls_get_addr:
static thread_local int x;
int g();
int f() {
int *px = &x;
if (g()) *px += g();
if (g()) *px += g();
if (g()) *px += g();
return
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: amohr at amohr dot org
Target Milestone: ---
gcc emits a call to __tls_get_addr for every iteration of the while loop below
at -O1 or above. It does not happen at -O0.
static