#include <perms.h>
// Edinburgh IMP77 Compiler - Version 8.4
//
// 1 %begin
int main(int argc, char **argv) { /*%begin*/
_imp_initialise(argc, argv);
// 2 %recordformat fm(%integer a,b,c)
struct FM {
union {
struct {
int A;
int B;
int C;
};
};
};
// 3
// 4 ! A similar construct in pass2.imp fails to detect the recordfields
// 5 ! of the routine parameters. It's not clear what the difference is.
// 6
// 7 %routine userec(%record (fm) %name dest, %record (fm) src)
void USEREC(struct FM * DEST, struct FM SRC) {
// 8 dest_b = src_a
DEST->B = SRC.A;
// 9 %end
return;
} /* end of USEREC */
// 10
// 11 %endofprogram
_imp_stop(0);
return 0;
end_0:;
}