fork download
  1. #include <iostream>
  2.  
  3. class C
  4. {
  5. public:
  6. C(char s) : m_s(s) {}
  7. ~C() { std::cout << "destroying C[" << m_s << "]\n"; }
  8. char m_s;
  9. };
  10.  
  11. int main() {
  12. while (1) {
  13. C c1('a');
  14. while (1) {
  15. C c2('b');
  16. goto outer;
  17. }
  18. }
  19. { C c3('c'); }
  20. outer:
  21. return 0;
  22. }
Success #stdin #stdout 0.01s 5548KB
stdin
Standard input is empty
stdout
destroying C[b]
destroying C[a]