Restore bootstrap on ARM
commitbe6676286a0fad2d7fdb6a258befe9deb826690e
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 14 Jun 2022 10:28:24 +0000 (14 12:28 +0200)
committerEric Botcazou <ebotcazou@adacore.com>
Tue, 14 Jun 2022 10:41:11 +0000 (14 12:41 +0200)
treee0204e62cc4018c51fdb889cbef7db9176408417
parentf907cf4c07cf51863dadbe90894e2ae3382bada5
Restore bootstrap on ARM

The -Wuse-after-free warning is explicitly disabled for destructors on ARM
because of the special ABI and the previous change to the warning machinery
uncovered another case where the warning data would be incorrectly erased.

gcc/
* warning-control.cc (copy_warning) [generic version]: Do not erase
the warning data of the destination location when the no-warning
bit is not set on the source.
(copy_warning) [tree version]: Return early if TO is equal to FROM.
(copy_warning) [gimple version]: Likewise.
gcc/testsuite/
* g++.dg/warn/Wuse-after-free5.C: New test.
gcc/testsuite/g++.dg/warn/Wuse-after-free5.C [new file with mode: 0644]
gcc/warning-control.cc