This is the mail archive of the
gcc-cvs@gcc.gnu.org
mailing list for the GCC project.
r273870 - in /trunk/gcc: ChangeLog testsuite/Ch...
- From: rsandifo at gcc dot gnu dot org
- To: gcc-cvs at gcc dot gnu dot org
- Date: Mon, 29 Jul 2019 08:46:54 -0000
- Subject: r273870 - in /trunk/gcc: ChangeLog testsuite/Ch...
Author: rsandifo
Date: Mon Jul 29 08:46:54 2019
New Revision: 273870
URL: https://gcc.gnu.org/viewcvs?rev=273870&root=gcc&view=rev
Log:
Prevent -Og from deleting stores to write-only variables
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
builds).
2019-07-29 Richard Sandiford <richard.sandiford@arm.com>
gcc/
* tree-cfg.c (execute_fixup_cfg): Don't delete stores to write-only
variables for -Og.
gcc/testsuite/
* 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.
Added:
trunk/gcc/testsuite/c-c++-common/guality/Og-static-wo-1.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/guality/guality.exp
trunk/gcc/testsuite/gcc.dg/guality/guality.exp
trunk/gcc/tree-cfg.c