This is the mail archive of the
mailing list for the GCC project.
Re: Prevent -Og from deleting stores to write-only variables
- From: Jeff Law <law at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org, richard dot sandiford at arm dot com
- Date: Sun, 7 Jul 2019 13:00:56 -0600
- Subject: Re: Prevent -Og from deleting stores to write-only variables
- References: <email@example.com>
On 7/7/19 3:41 AM, Richard Sandiford wrote:
> This patch prevents -Og from deleting stores to write-only variables,
> so that the values are still available when debugging. This seems
> more convenient than forcing users to use __attribute__((used))
> (probably conditionally, if it's not something they want in release
> Tested on aarch64-linux-gnu and x86_64-linux-gnu. OK to install?
> 2019-07-07 Richard Sandiford <firstname.lastname@example.org>
> * tree-cfg.c (execute_fixup_cfg): Don't delete stores to write-only
> variables for -Og.
> * c-c++-common/guality/Og-static-wo-1.c: New test.
> * g++.dg/guality/guality.exp: Separate the c-c++-common tests into
> "Og" and "general" tests. Run the latter at -O0 and -Og only.
> * gcc.dg/guality/guality.exp: Likewise.