]> git.ipfire.org Git - thirdparty/gcc.git/commit
hardened conditionals: drop copied identifiers
authorAlexandre Oliva <oliva@adacore.com>
Thu, 24 Mar 2022 13:02:29 +0000 (10:02 -0300)
committerAlexandre Oliva <oliva@gnu.org>
Thu, 24 Mar 2022 13:02:29 +0000 (10:02 -0300)
commitfb488cba571539b6644e8f99f1dd997cdb4c82c1
treecbf936383d278703c5dc1f1fd15158e4bb344cda
parentb8c4171ebd72079e55aceadbcfc883f517cdf895
hardened conditionals: drop copied identifiers

The copies of identifiers, indended to associate hardening SSA
temporaries to the original variables they refer to, end up causing
-fcompare-debug to fail, because DECL_UIDs are not identical, and the
nouid flag used in compare-debug dumps doesn't affect the uids in
naked identifiers, so the divergence becomes apparent.

This patch drops the naked identifiers.  Though somewhat desirable,
they're not necessary.

for  gcc/ChangeLog

PR debug/104564
* gimple-harden-conditionals.cc (detach_value): Keep temps
anonymous.

for  gcc/testsuite/ChangeLog

PR debug/104564
* c-c++-common/torture/harden-comp.c: Adjust.
* c-c++-common/torture/harden-cond.c: Adjust.
gcc/gimple-harden-conditionals.cc
gcc/testsuite/c-c++-common/torture/harden-comp.c
gcc/testsuite/c-c++-common/torture/harden-cond.c