On 7/26/23 12:00, Ng YongXiang wrote:
Hi Jason,
Thanks for the reply and review. I've attached an updated patch with the
change log and sign off.
The change made in gcc/testsuite/g++.dg/warn/pr83054.C is because I
think there is no more warning since we have already devirtualized the
destruction for the array.
Makes sense, and it's good to have your adjusted testcase in the
testsuite, it should just be a new one (maybe pr83054-2.C).
Apologies for the poor formatting. It is my first time contributing. Do
let me know if there's any stuff I've missed and feel free to modify the
patch where you deem necessary.
No worries!
The ChangeLog entries still need some adjustment, according to git
gcc-verify (from contrib/gcc-git-customization.sh, see
https://gcc.gnu.org/gitwrite.html):
ERR: line should start with a tab: " * init.c: Call non virtual
destructor of objects in array"
ERR: line should start with a tab: " *
g++.dg/devirt-array-destructor-1.C: New."
ERR: line should start with a tab: " *
g++.dg/devirt-array-destructor-2.C: New."
ERR: line should start with a tab: " * g++.dg/warn/pr83054.C:
Remove expected warnings caused by devirtualization"
ERR: PR 110057 in subject but not in changelog: "c++: devirtualization
of array destruction [PR110057]"
git gcc-commit-mklog (also from gcc-git-customization.sh) makes
generating ChangeLog entries a lot simpler.
* g++.dg/devirt-array-destructor-1.C: New.
Tests that look at tree-optimization dump files should go in the
g++.dg/tree-ssa subdirectory.
+/* { dg-do run } */
It seems unnecessary to execute these tests, I'd think the default of {
dg-do compile } would be fine.
It's also good to have a
// PR c++/110057
line at the top of the testcase for future reference. gcc-commit-mklog
also uses that to add the PR number to the ChangeLog.
Jason