#include <iostream>

class A {
 public:
   A(bool call) __attribute__((optnone)) {
   	std::cout << "A() is constructed (this = " << static_cast<void*>(this) << ")\n";
   	hello();
   }
   ~A() {
   	std::cout << "A() is destructed (this = " << static_cast<void*>(this) << ")\n";
   }
   virtual void hello() = 0;
};

void A::hello() {
  std::cout << "Hello from A! (this = " << static_cast<void*>(this) << ")\n";
}

class B : public A {
 public:
   B(bool call ) : A(call) {
   	std::cout << "B() is constructed (this = " << static_cast<void*>(this) << ")\n";
	hello();
   }
   ~B() {
   	std::cout << "B() is destructed (this = " << static_cast<void*>(this) << ")\n";
   }
   virtual void hello();
};

void B::hello() {
  std::cout << "Hello from B! (this = " << static_cast<void*>(this) << ")\n";
}

int main() {
  //B not_call(false);
  B call(true);
}