------ main.c --------
#include <stdio.h>

struct A {
int i;
};

extern struct A test();

int main() {
struct A a = test();
printf("%d\n", a.i);

return 0;
}
------ test.c --------
struct A {
int i;
int j;
};

struct A test() {
struct A a;
a.i = 0;
a.j = 1;
return a;
}