Bug: inconsistent behavior of pointers (5.00, build 2650)

 
Please, see the code example to replicate the mistake.
//+------------------------------------------------------------------+
//|                                                201022_083730.mq5 |
//|                                    2019-2020, dimitri pecheritsa |
//|                                                 792112@gmail.com |
//+------------------------------------------------------------------+
#property copyright "2019-2020, dimitri pecheritsa"
#property link      "792112@gmail.com"
#property version   "1.00"
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
//---
   C201022_090654 c_1(new C201022_090641); //works
   C201022_090654 c_3(new C201022_092325(1)); //works
//---'new' - parameter passed as reference, variable expected
   C201022_090654 c_2(new C201022_090641(1)); //not works
  }
//+------------------------------------------------------------------+
//| class                                              201022_091826 |
//+------------------------------------------------------------------+
class C201022_091826
  {
protected:
public:
                     C201022_091826(void) {}
                    ~C201022_091826(void) {}
   //---
  };
//+------------------------------------------------------------------+
//| class                                              201022_090641 |
//+------------------------------------------------------------------+
class C201022_090641
  {
protected:
   C201022_091826    m_obj;
public:
                     C201022_090641(void) {}
                     C201022_090641(int) {}
   //---
  };
//+------------------------------------------------------------------+
//| class                                              201022_092325 |
//+------------------------------------------------------------------+
class C201022_092325
  {
protected:
public:
                     C201022_092325(void);
                     C201022_092325(int);
   //---
  };
//+------------------------------------------------------------------+
//| class                                              201022_090654 |
//+------------------------------------------------------------------+
class C201022_090654
  {
protected:
public:
                     C201022_090654(void) {}
                     C201022_090654(C201022_090641&) {}
                     C201022_090654(C201022_092325&) {}
   //---
  };
//+------------------------------------------------------------------+


 
DMITRII PECHERITSA: Please, see the code example to replicate the mistake.
//---'new' - parameter passed as reference, variable expected
   C201022_090654 c_2(new C201022_090641(1)); //not works

So pass a variable

   C201022_090641 *p=new C201022_090641(1);
   C201022_090654 c_2(p);
   // p lost here memory leak.
 
William Roeder:

So pass a variable

you're so smart, and adaptive, and observant.

why don't you make something useful offline? 

 
If you want to point out a compiler bug, there's a thread in the Russian forum. I think the devs don't read here.
Reason: