1 /* { dg-do compile } */ 2 int ggggg(); 3 struct string { 4 static int _S_empty_rep_storage[]; 5 void _M_destroy(); 6 char* _M_rep; ~stringstring7 ~string() 8 { 9 if (_M_rep != (char*)&_S_empty_rep_storage ) 10 if (ggggg() <= 0) 11 _M_destroy(); 12 } 13 }; 14 extern void SDL_FreeSurface(int surface); 15 struct scoped_resource { ~scoped_resourcescoped_resource16 ~scoped_resource() { 17 SDL_FreeSurface(1); 18 } 19 }; 20 struct surface { 21 scoped_resource surface_; 22 }; 23 struct button { 24 string help_text_; 25 string label_; 26 surface image_; 27 }; 28 struct scrollbar { 29 string help_text_; 30 button uparrow_; 31 }; 32 scrollbar a; 33 34