Run-time problem when using singleton, inherit and constructor

This problem only happens when using singleton, inherit and customized constructor at the same time. It seems that the complier or linker are not working correctly on this situation. Is there any patch on it?

OS: Tested on Windows and Mac.
Arduino IDE: Version 1.6.13.
Arduino 101 Board Manager: Version 1.0.7.
Firmware updated.

Please see the following example. You can comment the customized constructor to eliminate this problem

class test1
    test1(){};  // You can comment this line to eliminate this runtime problem
    virtual void execute();  

class test2 :public test1
//    test2(){};  // You can comment this line to eliminate this runtime problem
    void execute(); 
    static test2* instance();

test2* test2::instance()
  static test2 state;
  return &state;

void test2::execute()

test2 *mytest = NULL;

void setup() {
  mytest = test2::instance();  
  Serial.println("test begin");

void loop() {

Hi jimaobian,
thanks for reporting, let's keep track of this issue on the core github repo Runtime problem with example · Issue #355 · arduino/ArduinoCore-arc32 · GitHub . Thanks again!

My pleasure Facchinm,
Thanks for your confirmation :slight_smile: