[Bug other/63440] -Og does enable -fmerge-constants too

2019-01-23 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63440

--- Comment #4 from Eric Gallager  ---
(In reply to Eric Gallager from comment #3)
> (In reply to Richard Biener from comment #1)
> > Note that the various "Enabled at levels ..." were not updated for -Og.
> 
> This part is bug 59658.

...which Sandra has since fixed.

[Bug other/63440] -Og does enable -fmerge-constants too

2018-07-23 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63440

Eric Gallager  changed:

   What|Removed |Added

 CC||egallager at gcc dot gnu.org
   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=59658

--- Comment #3 from Eric Gallager  ---
(In reply to Richard Biener from comment #1)
> Note that the various "Enabled at levels ..." were not updated for -Og.

This part is bug 59658.

[Bug other/63440] -Og does enable -fmerge-constants too

2014-10-06 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63440

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-10-06
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener rguenth at gcc dot gnu.org ---
Confirmed.  Do you think it is ok to enable -fmerge-constants with -Og?  Note
that the various Enabled at levels ... were not updated for -Og.


[Bug other/63440] -Og does enable -fmerge-constants too

2014-10-06 Thread rdiezmail-gcc at yahoo dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63440

--- Comment #2 from R. Diez rdiezmail-gcc at yahoo dot de ---
Yes, I would enable -fmerge-constants with -Og.

I would do it even for -O0. Merging constants should be safe, and it saves
precious program space when generating debug builds for small embedded targets.

Besides, in my opinion, it does not make sense that the addresses of some
literal strings suddenly change when you enable optimisations, because they get
collapsed. Any bugs because of such shared addresses should be apparent in
debug builds too.

Note that GCC already seems to apply some optimisations when building with -O0.
Specifically, I believe that at least some dead code elimination does occur.
That would make sense, as you do not want to bloat your debug builds
unnecessary.