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