#include <stdio.h>
void f1
(int* i
) { printf("%s %d\n", __func__
, *i
); } void f2
(int* i
) { printf("%s %d\n", __func__
, *i
); }
int main()
{
{
int i1 __attribute__((cleanup(f1))) = 1;
{
int i2 __attribute__((cleanup(f2))) = 2;
goto label_exit;
}
}
label_exit:
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+Cgp2b2lkIGYxKGludCogaSkgeyBwcmludGYoIiVzICVkXG4iLCBfX2Z1bmNfXywgKmkpOyB9CnZvaWQgZjIoaW50KiBpKSB7IHByaW50ZigiJXMgJWRcbiIsIF9fZnVuY19fLCAqaSk7IH0KCmludCBtYWluKCkKewoJewoJCWludCBpMSBfX2F0dHJpYnV0ZV9fKChjbGVhbnVwKGYxKSkpID0gMTsKCQl7CgkJCWludCBpMiBfX2F0dHJpYnV0ZV9fKChjbGVhbnVwKGYyKSkpID0gMjsKCgkJCWdvdG8gbGFiZWxfZXhpdDsKCQl9Cgl9CgpsYWJlbF9leGl0OgoJcmV0dXJuIDA7Cn0=