Spotted by Adam Nowacki, and it certainly looks dodgy to me. Only one of the objects gets destroyed in the following code: #include <stdio.h> struct A { ~A() { printf("Destroying\n"); } }; A make_a() { return A(); } struct B { B(A a = make_a()) {}; }; int main() { B b[5] = {}; }
*** This bug has been marked as a duplicate of bug 22877 ***