Hello,

I'm writing to seek for a review for an issue I filed some time ago.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110057 . A proposed patch is
attached in the bug tracker as well.

The gist of the issue is that in an array, we know the underlying type of
the object. An array must hold the type it is declared with, and it will
never be objects of derived type. Hence, there is a "devirtualization"
opportunity here. GCC is currently invoking the virtual destructor of the
objects in the container when the array destructs which shouldn't be the
case since we know for sure the object's type.

Thank you.

Best regards,
Yong Xiang

Reply via email to