#include <stdio.h>
struct Test {
char str;
};
void change1(struct Test *t){
t->str = 'B';
}
void change2(struct Test *t){
static struct Test tmp = { 'A' };
*t = tmp;
t->str = 'B';
}
int main(void) {
struct Test t1 = { 'A' };
change1(&t1);
struct Test t2 = { 'A' };
change1(&t2);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgpzdHJ1Y3QgVGVzdCB7CgljaGFyIHN0cjsKfTsKCnZvaWQgY2hhbmdlMShzdHJ1Y3QgVGVzdCAqdCl7Cgl0LT5zdHIgPSAnQic7Cn0KCnZvaWQgY2hhbmdlMihzdHJ1Y3QgVGVzdCAqdCl7CglzdGF0aWMgc3RydWN0IFRlc3QgdG1wID0geyAnQScgfTsKCSp0ID0gdG1wOwoJdC0+c3RyID0gJ0InOwp9CgppbnQgbWFpbih2b2lkKSB7CglzdHJ1Y3QgVGVzdCB0MSA9IHsgJ0EnIH07CgljaGFuZ2UxKCZ0MSk7CglwcmludGYoIiVjXG4iLCB0MSk7CgoJc3RydWN0IFRlc3QgdDIgPSB7ICdBJyB9OwoJY2hhbmdlMSgmdDIpOwoJcHJpbnRmKCIlY1xuIiwgdDIpOwoKCXJldHVybiAwOwp9