Subject: bug#76559: 31.0.50; [-O3 + PGTK] Crash when 'copying as kill'/'killing word'

From: Eli Zaretskii <[email-masked]>
Date: Thu, 27 Feb 2025 21:58:44 +0200

> Date: Thu, 27 Feb 2025 10:50:18 -0800
> Cc: Po Lu <[email-masked]>, [email-masked],
>  [email-masked], [email-masked], [email-masked],
>  Stefan Kangas <[email-masked]>, Eli Zaretskii <[email-masked]>
> From: Paul Eggert <[email-masked]>
> 
> >> I believe we should recommend against using -O3.  Too many bad bugs
> > 
> > If we do that, can we include link time optimization in that?
> 
> I've found real bugs with -flto, an option that is not supposed to 
> introduce bugs though it may trigger latent bugs. Although I'm not a fan 
> of -flto for typical use (for one thing, it's too expensive) I don't 
> think we should discourage it at least when debugging.
> 
> Similarly for -O3.

The problem with -O3 that too many recent GCC versions had bugs in it,
especially in the first version of a major release.  By "recommend
against" I meant to advise users and distros (as opposed to Emacs
developers) not to use it.  I didn't mean to reject it, so if you or
someone else wants to use it as a means for finding bugs, you can.

People nowadays are likely to upgrade to the latest GCC version as
soon as it's out, and immediately start using it for production, and
are also too eager to use -O3 without checking whether it gives them
any gains.  The recommendation I have in mind aims at making the lives
of those users safer and less complicated.