https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120890
--- Comment #4 from De Rycke, Dirk ---
(In reply to Andrew Pinski from comment #3)
> I am 99% sure the behavior here is correct as you can't delete an array of
> derivedClass via a pointer of vBaseClass. It will always delete an array of
> vBase
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120890
--- Comment #2 from De Rycke, Dirk ---
Compilation optimization options are irrelevant.
Just compile with g++ and run the output
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120890
--- Comment #1 from De Rycke, Dirk ---
// the simple example
#include
#include
class vBaseClass
{
public:
vBaseClass ()
{
printf ("Construct %s\n", __PRETTY_FUNCTION__);
}
virtual ~ vBaseClass ()
{
printf ("Destruct %s\n",
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120890
Bug ID: 120890
Summary: virtual destructor on base class variable does not
call derived class destructor when using [] destructor
Product: gcc
Version: 14.2.0
Status: UN