1 // Based on a testcase by Bryan Weston <bryanw@bluemoon.sps.mot.com>
2 // egcs 1.1 fails to increment count
4 // Special g++ Options: -O2
6 struct Base { Base() {} }; // removing the constructor fixes the problem
7 struct Derived : Base {}; // so does removing the base class
11 Derived* array[1]; // making this Base*[1] does not fix the problem
12 array[count++] = new Derived (); // but then new Base() does