1// Test that we clean up temporaries bound to references properly when 2// jumping out of their scope. 3 4int ret = 1; 5 6struct A 7{ 8 ~A() { ret = 0; } 9}; 10 11void f() 12{ 13 if (0) 14 { 15 out: 16 return; 17 } 18 const A& a = A(); 19 goto out; 20} 21 22int main() 23{ 24 f(); 25 return ret; 26} 27